diff options
author | Yigit Boyar <yboyar@google.com> | 2014-12-12 18:45:04 -0800 |
---|---|---|
committer | Yigit Boyar <yboyar@google.com> | 2014-12-16 16:18:06 -0800 |
commit | 8ffce57a6056a34c9568ef1893d6e36ce80f2245 (patch) | |
tree | 5e2fe10eea059c2eb3031279910c70a84155f045 /gradlePlugin | |
parent | ba43938d2c4c915859960563ec3c439deddacacf (diff) | |
download | data-binding-8ffce57a6056a34c9568ef1893d6e36ce80f2245.tar.gz |
Upload plugin for new lang
Diffstat (limited to 'gradlePlugin')
-rw-r--r-- | gradlePlugin/src/main/kotlin/plugin.kt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gradlePlugin/src/main/kotlin/plugin.kt b/gradlePlugin/src/main/kotlin/plugin.kt index c5a0cf89..535659d1 100644 --- a/gradlePlugin/src/main/kotlin/plugin.kt +++ b/gradlePlugin/src/main/kotlin/plugin.kt @@ -74,14 +74,13 @@ class DataBinderPlugin : Plugin<Project> { // TODO read from app val variants = arrayListOf("Debug") parser = createKParser(project) - parser.process() log("after eval") //processDebugResources variants.forEach { variant -> - val preTasks = it.getTasksByName("pre${variant}Build", true) - preTasks.forEach { - it.doLast (generateAttr) - } +// val preTasks = it.getTasksByName("pre${variant}Build", true) +// preTasks.forEach { +// it.doLast (generateAttr) +// } val processResTasks = it.getTasksByName("process${variant}Resources", true) processResTasks.forEach { it.doFirst (generateAttr) @@ -125,7 +124,8 @@ class DataBinderPlugin : Plugin<Project> { sources.forEach({ log("source: ${it}"); }) - val resourceFolders = variantData.mergeResourcesTask.getRawInputFolders() + val resourceFolders = arrayListOf(variantData.mergeResourcesTask.getOutputDir()) + log("MERGE RES OUTPUT ${variantData.mergeResourcesTask.getOutputDir()}") //TODO val codeGenTargetFolder = variantData.generateRClassTask.getSourceOutputDir() val resGenTargetFolder = variantData.generateRClassTask.getResDir() @@ -214,6 +214,7 @@ class DataBinderPlugin : Plugin<Project> { } fun generateAttr(o: Any?) { + parser.processIfNecessary() log("generate attr ${o}") parser.writeAttrFile() } @@ -227,6 +228,7 @@ class DataBinderPlugin : Plugin<Project> { } fun generateBrFile(o: Any?) { + parser.processIfNecessary() log("generating BR ${o}") parser.writeBrFile() parser.writeViewBinderInterfaces() |