Procházet zdrojové kódy

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 před 11 roky
rodič
revize
f7db56e358
1 změnil soubory, kde provedl 7 přidání a 2 odebrání
  1. 7
    2
      build.gradle

+ 7
- 2
build.gradle Zobrazit soubor

4
   sourceSets {
4
   sourceSets {
5
     // Verify that the tests are working by running them against the example code.
5
     // Verify that the tests are working by running them against the example code.
6
     // By replacing the "main" sourceSet with the example code we avoid any collisions
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
     main {
8
     main {
9
       java.srcDirs = ["src/example/java"]
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
     starterSource {
15
     starterSource {
14
       java.srcDirs = ["src/main/java"]
16
       java.srcDirs = ["src/main/java"]
15
     }
17
     }
18
+    project["compileStarterSourceJava"].doFirst { compileTask ->
19
+      println "  (source = " + compileTask.source.asPath + ")"
20
+    }
16
   }
21
   }
17
 }
22
 }