changeset 4029:7ba42dc66b10

Partial RT-31067: Gradle: add verbose flag to generateThenDelete task
author kcr
date Fri, 21 Jun 2013 10:15:34 -0700
parents e8ece2a01adb
children 861cc97175cb
files generator.gradle
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/generator.gradle	Fri Jun 21 09:58:54 2013 -0700
+++ b/generator.gradle	Fri Jun 21 10:15:34 2013 -0700
@@ -32,6 +32,11 @@
     project.ext.FXDir = "../javafx"
 }
 
+def verbose = false
+if (project.hasProperty('VERBOSE')) {
+    verbose = Boolean.parseBoolean(VERBOSE);
+}
+
 task generate << {
     def excludeFromSource = ["META-INF/**", "**/doc-files/**/*", "**/*.properties", "**/*.stg", "**/*.g", "**/*.css", "**/*.png", "**/*.jpg", "**/*.gif", "nbproject", "*.iml", "**/*.txt", "**/*.fxml", "**/*.bak", "**/*.orig", "**/*.js", "**/*.frag", "**/*.vert"]
     def includeInResources = ["META-INF/**", "**/*.properties", "**/*.stg", "**/*.css", "**/*.png", "**/*.jpg", "**/*.gif", "**/*.txt", "**/*.fxml", "**/*.js", "**/*.frag", "**/*.vert"]
@@ -839,11 +844,11 @@
         // Delete all copied files
         def nFiles = fileList.size();
         println "Deleting ${nFiles} files"
-        /*
-        fileList.each { f ->
-            println "rm $f";
+        if (verbose) {
+            fileList.each { f ->
+                println "delete: $f";
+            }
         }
-        */
         delete(fileList);
 
     }