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
/frameworks/data-binding/compiler/src/main/kotlin/android/databinding/tool/writer/BRWriter.kt
|
4ba16229a40e9758db86d4fb1df5119fdcb8aa2a |
|
22-Dec-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Change from commons-lang3 to guava Change-Id: I1a18e06af7bf2d65228f1491663b6e096a9538ed
/frameworks/data-binding/compiler/src/main/kotlin/android/databinding/tool/writer/BRWriter.kt
|
59229481aec5a284d322a2ca80dff836485feb0c |
|
30-Oct-2015 |
Yigit Boyar <yboyar@google.com> |
upgrade kotlin to 1.0-beta1 Change-Id: I62b77fd118e2715d272a16d96b9083d2347f5fb1
/frameworks/data-binding/compiler/src/main/kotlin/android/databinding/tool/writer/BRWriter.kt
|
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
/frameworks/data-binding/compiler/src/main/kotlin/android/databinding/tool/writer/BRWriter.kt
|
4df4ba38a62b791bbbc25e923efe8d9c2f9a52e9 |
|
27-Jun-2015 |
Yigit Boyar <yboyar@google.com> |
Data binding startup improvement This CL replaces how we map tags(string) to layout ids in the generated DataBindingMapper class. Previously, we would create a hashmap which was some unnecessary work in startup. The alternative was using switch(string) but we did not want to require java 7. This CL does what java 7's switch(string) would do thanks to the well defined API of String.hashCode. This CL also adds a method to DataBindingUtil to convert BR.ids back to String for debugging purposes. Bug: 22108735 Change-Id: I4b8ef816f4aac99b2963793dd46519b056ce4a30
/frameworks/data-binding/compiler/src/main/kotlin/android/databinding/tool/writer/BRWriter.kt
|