Skip to content

Commit 6dc1961

Browse files
authored
Fix build script and travis.yml to support more java versions.
1 parent 8cb8fff commit 6dc1961

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: java
2-
dist: precise
3-
sudo: required
2+
dist: trusty
43

54
before_cache:
65
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
@@ -11,8 +10,13 @@ cache:
1110
- $HOME/.gradle/wrapper/
1211

1312
jdk:
14-
- oraclejdk7
1513
- oraclejdk8
14+
- oraclejdk9
15+
- oraclejdk11
16+
- openjdk7
17+
- openjdk8
18+
- openjdk10
19+
1620
env:
1721
- MODULE=core
1822
- MODULE=http42
@@ -24,5 +28,5 @@ branches:
2428
- staging-test
2529

2630
# ciTest is configured to skip the various timeout tests that don't work in travis
27-
script: ./gradlew clean ciTest -p cloudinary-${MODULE} -i
31+
script: ./gradlew clean -DCLOUDINARY_URL=$CLOUDINARY_URL ciTest -p cloudinary-${MODULE} -i
2832

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ allprojects {
1818

1919
subprojects {
2020
tasks.withType(Test) {
21+
environment 'CLOUDINARY_URL', System.getProperty('CLOUDINARY_URL')
2122
maxParallelForks = Runtime.runtime.availableProcessors()
2223

2324
// show standard out and standard error of the test JVM(s) on the console

cloudinary-test-common/src/main/java/com/cloudinary/test/MockableTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.cloudinary.Cloudinary;
44
import com.cloudinary.utils.ObjectUtils;
55
import com.cloudinary.utils.StringUtils;
6-
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
76

87
import java.io.IOException;
98
import java.util.Map;
@@ -18,13 +17,13 @@ public class MockableTest {
1817
protected Cloudinary cloudinary;
1918

2019
protected Object getParam(String name){
21-
throw new NotImplementedException();
20+
throw new UnsupportedOperationException();
2221
}
2322
protected String getURL(){
24-
throw new NotImplementedException();
23+
throw new UnsupportedOperationException();
2524
}
2625
protected String getHttpMethod(){
27-
throw new NotImplementedException();
26+
throw new UnsupportedOperationException();
2827
}
2928

3029
protected Map preloadResource(Map options) throws IOException {

0 commit comments

Comments
 (0)