summaryrefslogtreecommitdiff
path: root/gradlePlugin
diff options
context:
space:
mode:
authorYigit Boyar <yboyar@google.com>2015-01-26 11:11:46 -0800
committerYigit Boyar <yboyar@google.com>2015-01-26 16:10:09 -0800
commitdc69f49d687ec036947f26a9bf9025a305de0721 (patch)
treef372dc60dbd50877df49acfe458960d280f2b822 /gradlePlugin
parent5cd681c345db8f606d7d5a8662e20e059f21a86c (diff)
downloaddata-binding-dc69f49d687ec036947f26a9bf9025a305de0721.tar.gz
properly handle expressions which are static.
Also make bindable a runtime expression so that we can read it in the compiler Change-Id: Id8f6cdf010dde61d64a20841557c3b997916fbf9
Diffstat (limited to 'gradlePlugin')
-rw-r--r--gradlePlugin/src/main/kotlin/plugin.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/gradlePlugin/src/main/kotlin/plugin.kt b/gradlePlugin/src/main/kotlin/plugin.kt
index a4aba013..46f23e75 100644
--- a/gradlePlugin/src/main/kotlin/plugin.kt
+++ b/gradlePlugin/src/main/kotlin/plugin.kt
@@ -180,6 +180,10 @@ class DataBinderPlugin : Plugin<Project> {
project.task("compileGenerated", MethodClosure(this, "compileGenerated"))
}
fun compileGenerated(o : Any?) {
+ log("SSXX: ${parser.generatedCode()}")
+ if (!parser.generatedCode()) {
+ return
+ }
val compiler = ToolProvider.getSystemJavaCompiler()
val fileManager = compiler.getStandardFileManager(null, null, null)
val javaCompileTask = variantData.javaCompileTask