summaryrefslogtreecommitdiff
path: root/developmentPlugins
diff options
context:
space:
mode:
authorYigit Boyar <yboyar@google.com>2016-02-02 11:48:47 -0800
committerYigit Boyar <yboyar@google.com>2016-02-16 14:22:34 -0800
commit6047998943beebd81e0ae1068df39c0cbee38628 (patch)
treeb20ac4ba515655202a734f851792e2d865fc2f57 /developmentPlugins
parentbb6f72ae4247ffd0f71e5e93a7c5082787e821ed (diff)
downloaddata-binding-6047998943beebd81e0ae1068df39c0cbee38628.tar.gz
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
Diffstat (limited to 'developmentPlugins')
-rw-r--r--developmentPlugins/localizeMavenPlugin/src/main/groovy/android/databinding/ExportLicensesTask.groovy2
1 files changed, 1 insertions, 1 deletions
diff --git a/developmentPlugins/localizeMavenPlugin/src/main/groovy/android/databinding/ExportLicensesTask.groovy b/developmentPlugins/localizeMavenPlugin/src/main/groovy/android/databinding/ExportLicensesTask.groovy
index 4db1f39b..f883f68a 100644
--- a/developmentPlugins/localizeMavenPlugin/src/main/groovy/android/databinding/ExportLicensesTask.groovy
+++ b/developmentPlugins/localizeMavenPlugin/src/main/groovy/android/databinding/ExportLicensesTask.groovy
@@ -25,7 +25,7 @@ class ExportLicensesTask extends DefaultTask {
static def knownLicenses = [
[
libraries: ["kotlin-stdlib", "kotlin-runtime", "kotlin-annotation-processing", "kotlin-gradle-plugin", "kotlin-gradle-plugin-api",
- "kdoc", "kotlin-gradle-plugin-core", "kotlin-jdk-annotations", "kotlin-compiler", "kotlin-compiler-embeddable"],
+ "kdoc", "kotlin-gradle-plugin-core", "kotlin-jdk-annotations", "kotlin-compiler", "kotlin-compiler-embeddable", "kotlin-android-extensions"],
licenses : ["https://raw.githubusercontent.com/JetBrains/kotlin/master/license/LICENSE.txt",
"http://www.apache.org/licenses/LICENSE-2.0.txt"],
notices : ["https://raw.githubusercontent.com/JetBrains/kotlin/master/license/NOTICE.txt"]