Просмотр исходного кода

Run tests against examples & compile starter code

- adjusted "etl" as it has "starter" code.
John S. Ryan 11 лет назад
Родитель
Сommit
a8a96a0920
4 измененных файлов: 12 добавлений и 4 удалений
  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 Просмотреть файл

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

+ 10
- 2
build.gradle Просмотреть файл

@@ -1,9 +1,17 @@
1
-subprojects {
1
+subprojects { project ->
2 2
   apply plugin: "java"
3 3
 
4 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 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 Просмотреть файл


+ 1
- 1
settings.gradle Просмотреть файл

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