• Home
  • History
  • Annotate
  • only in /frameworks/data-binding/compilationTests/src/test/java/android/databinding/compilationTest/
History log of /frameworks/data-binding/compilationTests/src/test/java/android/databinding/compilationTest/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
78dc9ae6d67ae94bf3f637eeea0848e4f700b7a3 21-Apr-2016 George Mount <mount@google.com> Fix problem where root View's style is used instead of bound View's

Bug 27808662

Change-Id: I870b0db47e3ed970a3bd67e602e873e503610028
impleCompilationTest.java
15b6682cf3505b117329e2190967c92a89b179e9 08-Apr-2016 Yigit Boyar <yboyar@google.com> Move to org.antlr from tunnelvision

We were using a version of antlr that is published by
tunnelvision which works fine but this becomes a problem
when another gradle plugin wants to depend on antlr as
well. It is best if we depend on the original one to
avoid conflicts with other libs.

Bug: 27175207
Change-Id: I0a87f9902361ace5dc6d03d838e2ad431c844de8
ultiLayoutVerificationTest.java
11df39c91611b9ff2d7c87a9a9829251a015bccf 16-Mar-2016 George Mount <mount@google.com> Added simple inverted String conversion.

When binding a primitive to an EditText, a common
pattern is to use '@{"" + value}'. This, however,
doesn't allow for a two-way data binding expressions.
To mitigate the need for conversion functions, a simple
inversion for this expression wsa implemented that
just converts value from a String when possible.

This CL also fixes a bug in which a method matching
the first parameter was always chosen, reguardless of
the second and further parameters.

Change-Id: I36828d9f54d2073965358fceb140b2d5e6328919
impleCompilationTest.java
c0c1dab0b6254e4d27f18c37a72a9e7952e958a0 02-Mar-2016 George Mount <mount@google.com> Support for java 8 method reference syntax.

Bug 26937350

Our event handling syntax is obj.method, where java 8
uses the syntax obj::method. This adds support for
the java 8 syntax and adds a deprecation warning for
the old syntax.

Change-Id: Ideb0570c2646f674da031f642ed3369e8c5fcd3b
impleCompilationTest.java
bb4a033fcd5cd20e5be46ef8ead442dc7db2454d 18-Feb-2016 George Mount <mount@google.com> Have two-way binding use localized variables to prevent NPE.

Bug 26962999

Two-way binding was using the inverted expressions directly
without localizing variables. That meant that if there was
a variable set to null during evaluation, it may get a
NullPointerException even though it checked for null
on the value previously. This CL localizes the variables
so that cannot happen.

Change-Id: Ia55955ce0f1cb750e6a678e72e0cda03f0e3c9b6
impleCompilationTest.java
b7eeedbfadec03792551014e9dfa2bd384fc21a3 17-Sep-2015 George Mount <mount@google.com> Two-way binding tests

Bug 1474349
Bug 22460238

Tests for two-way data binding can't be checked in until the
SDK becomes public. Also updates the sample application because
it has the same restrictions.

Change-Id: I7e2b2f84943844401d2b8edbac4e60ea9f5704a6
impleCompilationTest.java
6047998943beebd81e0ae1068df39c0cbee38628 02-Feb-2016 Yigit Boyar <yboyar@google.com> Lambda In da house

This CL adds support for assigning callbacks to listeners using lambda expressions.
These expressions can receive either 0 or N arguments where N is equal to the
number of parameters in the callback function.

These expressions are evaluated when the callback is invoked. In other words, they
are independent from the rest of the ExprModel except the Identifier expressions.

Since these are limited to 1 full expression and they don't have any invalidation
flags; we use a verbose branching code generation mode where we calculate all possible
execution paths, eliminate trivial ones and generate the code. This allows callbacks
to be thread safe as well. See ExecutionPath class for details.
It is not efficient but since these are rere occasions, should be OK.

Callback expressions are still forced to be expressions that return value. To handle
`void` case, I've added `void` and `Void` as acceptable symbols. Also, if the callback
method returns void, the expression is free to return `void` or any other value.
¯\\_(ツ)_/¯

I've also moved kotlin to rc0. Although rc0 is unrelated to this task, it made more
sense to upgrade here because most changes it will ask for were already done in
this branch.

Bug: 26849440
Change-Id: I805b3d470f85df9c2ce3f3ed5ca74925a08bb7a5
ompilationResult.java
impleCompilationTest.java
89e50f43810ee32d8fc8ea359cd8e0ca4e9c8de4 23-Jan-2016 Yigit Boyar <yboyar@google.com> Fix incremental compilation when dependency layout is removed

This CL fixes a bug where if gradle dependency of a module is removed,
we would not delete its layout files properly.

Change-Id: Ifa5529768ed959acd8b6a903ad33d8f1e42159f7
Bug: 25755539
aseCompilationTest.java
impleCompilationTest.java
9784c9aaedeb863018f5fcaa0a598e8e2f8ed2f3 13-Oct-2015 Yigit Boyar <yboyar@google.com> Data binding as studio dep + java6

This CL gets rid of the gradle plugin and instead provides
DataBindingBuilder for the gradle plugin to directly use.

Now, everything that is deployed via SDK Manager (lib and adapters)
are included as prebuilts so that we avoid accidently changing
them w/o an SDK manager release.

There is still work to do:
> re-enable proguard for externel dependencies
> release a batch to ensure everything works

Bug: 22516688
Change-Id: I83ace15bd6d3d23bf5b4ad850f36453dd23ebd43
aseCompilationTest.java
ultiLayoutVerificationTest.java
impleCompilationTest.java
ddeffcc2d89275528b2001836da2795b14ea7909 08-Oct-2015 Yigit Boyar <yboyar@google.com> Create tag from original file

XMLEditor was creating root view tag from the file in build folder
which becomes a problem if android gradle plugin decides to create
more variations of the source file. This CL fixes that issue and always
uses the folder name from the original file if exists.

Bug: 24745000
Change-Id: I169db02ffa4985328e408cc347d83c984bd2f5ad
impleCompilationTest.java
fd8342a51a96282df315cd27055ba539e89a8c9e 07-Oct-2015 Yigit Boyar <yboyar@google.com> Report syntax errors even though Antlr can recover

This CL makes Antlr parser more strict by not allowing errors.
Antlr usually tries to recover from these errors but thats
not what we really want for this use case.

This CL also updates version codes to rc4 since rc3 is already out.

Change-Id: I0d305e06a6cdcbae2f37573c3c6ae4233cdd7958
impleCompilationTest.java
99c02c7c337ea01ffa81ffde220babde2107e989 29-Sep-2015 Yigit Boyar <yboyar@google.com> Pass command line args to compilatin tests

Change-Id: Iad479df825207c3a37a9bc94b658d1133b31850c
aseCompilationTest.java
92a428505b9102bc0560d2d5be1768da097909c2 06-Aug-2015 George Mount <mount@google.com> Support binding expressions in android:tag attribute.

Bug 22972105

Also added error reporting for tags on root elements
and tests. ICS+ supports tags on root elements.

Change-Id: I1f3fe5e59b68a04fd80e3e2638a7b7743fac027d
impleCompilationTest.java
24bec1cc542de69e0e21cc774469f20d34811ad9 09-Jul-2015 Yigit Boyar <yboyar@google.com> Localize Maven

This CL introduces a new development plugin that downloads all
dependencies into the given repository. This will allow us to
build data binding in build servers w/o internet connection.

By default, it is setup to disable public repositories to avoid
adding a new dependency w/o running the script.
Public repositories can be added by running -PaddRemoteRepos=true.
There is also a convenience script to fetch dependencies.
localize.sh

Bug: 19626302
Change-Id: I9d200550b76c3b60119cdbbdb4e1e7772d0da1d7
aseCompilationTest.java
ompilationResult.java
impleCompilationTest.java
fb595334b2f1cfe69823335b6a239c75ad87c103 07-Jul-2015 Yigit Boyar <yboyar@google.com> Merge "Print encoded errors only if data binding is invoked from the IDE" into mnc-dev
aafbe5a2394ff9826201cca97d3298a9f355e311 01-Jul-2015 Yigit Boyar <yboyar@google.com> Add errors for layout files in different configs

This CL adds ScopedExceptions to multi-config layout parsing.

Bug: 21953001
Change-Id: I5d62b711120e890733e7f5c08108041109e4eefd
aseCompilationTest.java
ultiLayoutVerificationTest.java
impleCompilationTest.java
08119ea342cb47910ca80ff646d746f00e4663ce 06-Jul-2015 Yigit Boyar <yboyar@google.com> Print encoded errors only if data binding is invoked from the IDE

This CL makes Scope aware of execution environment. Now when invoked
from tests or via IDE, we'll print exceptions as encoded so that we
can parse them back. When user invokes from command line or any other
tool, we will print human readable errors.

The encoded error format may still change depending on conversations
w/ Studio team.

Bug: 21953001
Change-Id: I5bd3ea0cb6728e011225ee84d3e38817a2993a43
aseCompilationTest.java
impleCompilationTest.java
731b74f7f44e67312a1fc4161c4e0aae221b2417 25-Jun-2015 Yigit Boyar <yboyar@google.com> Introduce Scopes to track logical stack traces

This CL introduces a static class called Scope, which is
used the logical processing stack for data binding.
These scopes are used to generate meaningful error messages
when an error is detected.

Bug: 21953001
Change-Id: I5470a8c4ad94401d34a140762baae9d53c5a0402
aseCompilationTest.java
ompilationResult.java
impleCompilationTest.java
3e3bf43a2e11fb433b43558e2e05255edfa5b6a8 23-Jun-2015 George Mount <mount@google.com> Give an error when includes are in the root of data bound layouts.

Bug 22032146

Change-Id: Ia20264a843edf70358ea37cdf31ab8b5686052b8
aseCompilationTest.java
impleCompilationTest.java
8b1da958f181639d33dfaa907c0ee66add2decd6 23-Jun-2015 Yigit Boyar <yboyar@google.com> Don't generate inflators for libraries

If a library project (A) depends on anohter library project (B),
we would generate code that accesses R file of project B while
compiling project A. Unfortunately, gradle does not generate that
R file when compiling A, it only exists when compiling the app
and B.
This CL changes the base class generation to not to generate
real code for base classes unless we are building the final app.

Bug: 22001270
Change-Id: Ic107001ab58c94016f37f7f6fc0470a822db3aa7
aseCompilationTest.java
impleCompilationTest.java
9064a1dd60eb8c2f9d2ed705b36bb5f0b1629771 09-Jun-2015 Yigit Boyar <yboyar@google.com> Compilation tests module

This CL adds a new module which is a java project that can be
used to create one-off project setups. This module will be
used to test error cases and to make sure we detect errors
and dispatch proper error messages.

I've also updated antlr to 4.5 which gets rid of the annoying
annotation processor source compatibility error:
https://github.com/antlr/antlr4/issues/487

Bug: 21735564
Change-Id: I16c04923c7d69ca40fe13139acaf87c08166ad95
aseCompilationTest.java
ompilationResult.java
impleCompilationTest.java