Explorar el Código

Make the source path of each compile explicit

- without this output, another contributor might make the reasonable
  (but incorrect) assumption that the source being compiled to exercise
  the tests are from 'src/main/java'.
John S. Ryan hace 11 años
padre
commit
f7db56e358
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7
    2
      build.gradle

+ 7
- 2
build.gradle Ver fichero

@@ -4,14 +4,19 @@ subprojects { project ->
4 4
   sourceSets {
5 5
     // Verify that the tests are working by running them against the example code.
6 6
     // By replacing the "main" sourceSet with the example code we avoid any collisions
7
-    //   with solution code that may have been included as a jumpstart (e.g. etl).
7
+    //   with solution code that may have been included as a "starter" (e.g. etl).
8 8
     main {
9 9
       java.srcDirs = ["src/example/java"]
10 10
     }
11
-    println "Source directory for " + project.name + "'s main source set: " + main.java.srcDirs
11
+    project["compileJava"].doFirst { compileTask ->
12
+      println "  (source = " + compileTask.source.asPath + ")"
13
+    }
12 14
 
13 15
     starterSource {
14 16
       java.srcDirs = ["src/main/java"]
15 17
     }
18
+    project["compileStarterSourceJava"].doFirst { compileTask ->
19
+      println "  (source = " + compileTask.source.asPath + ")"
20
+    }
16 21
   }
17 22
 }