This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
     new 99aa01a  Make sure FmppTask re-executes in case default_config.fmpp 
changes
99aa01a is described below

commit 99aa01a215587a6121f5d0e4dc4c698eb6db6598
Author: Vladimir Sitnikov <[email protected]>
AuthorDate: Sat Feb 6 01:53:53 2021 +0300

    Make sure FmppTask re-executes in case default_config.fmpp changes
---
 .../main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
 
b/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
index f591d7e..2f3ed17 100644
--- 
a/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
+++ 
b/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
@@ -48,6 +48,11 @@ open class FmppTask @Inject constructor(
     @PathSensitive(PathSensitivity.RELATIVE)
     val templates = objectFactory.directoryProperty()
 
+    @InputFile
+    @PathSensitive(PathSensitivity.NONE)
+    val defaultConfig = objectFactory.fileProperty()
+        .convention(templates.file("../default_config.fmpp"))
+
     @OutputDirectory
     val output = objectFactory.directoryProperty()
         .convention(project.layout.buildDirectory.dir("fmpp/$name"))
@@ -72,8 +77,8 @@ open class FmppTask @Inject constructor(
                 "configuration" to config.get(),
                 "sourceRoot" to templates.get().asFile,
                 "outputRoot" to output.get().asFile,
-                "data" to "tdd(" + config.get().toString().tddString() + "), " 
+
-                    "default: tdd(" + 
"${templates.get().asFile}/../default_config.fmpp".tddString() + ")"
+                "data" to "tdd(${config.get().toString().tddString()}), " +
+                    "default: 
tdd(${defaultConfig.get().toString().tddString()})"
             )
         }
     }

Reply via email to