Selaa lähdekoodia

Configure Travis to run tests against examples

- move example.java so we can refer to it in Gradle as a soureSet.
- Java requires public classes be contained in identically-named files.
- using latest Travis infrastructure (better, stronger, faster).
- each piece of travis config has been confirmed as minimum necessary at
  this time.
  - without JDK specified, would run with default (Java 7)
  - without TERM=dumb, travis output is unreadable.
John S. Ryan 11 vuotta sitten
vanhempi
commit
2a36a247ee

+ 8
- 1
.travis.yml Näytä tiedosto

1
-language: bash
1
+language: java
2
+jdk:
3
+  - oraclejdk8
4
+
5
+# http://docs.travis-ci.com/user/migrating-from-legacy
6
+sudo: false
2
 
7
 
3
 script:
8
 script:
4
   - bin/fetch-configlet
9
   - bin/fetch-configlet
5
   - bin/configlet .
10
   - bin/configlet .
11
+  - gradle --version
12
+  - TERM=dumb gradle check

+ 4
- 0
prime-factors/build.gradle Näytä tiedosto

9
 dependencies {
9
 dependencies {
10
   testCompile "junit:junit:4.12"
10
   testCompile "junit:junit:4.12"
11
 }
11
 }
12
+
13
+// ignore; used by track maintainers.
14
+sourceSets { example { } }
15
+dependencies { testCompile sourceSets.example.output }

prime-factors/example.java → prime-factors/src/example/java/PrimeFactors.java Näytä tiedosto


+ 5
- 0
robot-name/build.gradle Näytä tiedosto

6
   mavenCentral()
6
   mavenCentral()
7
 }
7
 }
8
 
8
 
9
+
9
 dependencies {
10
 dependencies {
10
   testCompile "junit:junit:4.10"
11
   testCompile "junit:junit:4.10"
11
 }
12
 }
13
+
14
+// ignore; used by track maintainers.
15
+sourceSets { example { } }
16
+dependencies { testCompile sourceSets.example.output }

robot-name/example.java → robot-name/src/example/java/Robot.java Näytä tiedosto


+ 1
- 0
settings.gradle Näytä tiedosto

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