Sfoglia il codice sorgente

Run tests against examples & compile starter code

- adjusted "etl" as it has "starter" code.
John S. Ryan 11 anni fa
parent
commit
a8a96a0920
4 ha cambiato i file con 12 aggiunte e 4 eliminazioni
  1. 1
    1
      .travis.yml
  2. 10
    2
      build.gradle
  3. 0
    0
      etl/src/example/java/Etl.java
  4. 1
    1
      settings.gradle

+ 1
- 1
.travis.yml Vedi File

7
 
7
 
8
 script:
8
 script:
9
   - gradle --version
9
   - gradle --version
10
-  - TERM=dumb gradle check --continue
10
+  - TERM=dumb gradle check compileStarterSourceJava --continue
11
   - bin/fetch-configlet
11
   - bin/fetch-configlet
12
   - bin/configlet .
12
   - bin/configlet .

+ 10
- 2
build.gradle Vedi File

1
-subprojects {
1
+subprojects { project ->
2
   apply plugin: "java"
2
   apply plugin: "java"
3
 
3
 
4
   sourceSets {
4
   sourceSets {
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
7
+    //   with solution code that may have been included as a jumpstart (e.g. etl).
5
     main {
8
     main {
6
-      java.srcDirs = ['src/example/java']
9
+      java.srcDirs = ["src/example/java"]
10
+    }
11
+    println "Source directory for " + project.name + "'s main source set: " + main.java.srcDirs
12
+
13
+    starterSource {
14
+      java.srcDirs = ["src/main/java"]
7
     }
15
     }
8
   }
16
   }
9
 }
17
 }

etl/example.java → etl/src/example/java/Etl.java Vedi File


+ 1
- 1
settings.gradle Vedi File

1
-include 'robot-name', 'prime-factors'
1
+include 'etl', 'robot-name', 'prime-factors'