Skip to content

Commit

Permalink
Fix build script and travis.yml to support more java versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitzanj authored Feb 21, 2019
1 parent 8cb8fff commit 6dc1961
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: java
dist: precise
sudo: required
dist: trusty

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand All @@ -11,8 +10,13 @@ cache:
- $HOME/.gradle/wrapper/

jdk:
- oraclejdk7
- oraclejdk8
- oraclejdk9
- oraclejdk11
- openjdk7
- openjdk8
- openjdk10

env:
- MODULE=core
- MODULE=http42
Expand All @@ -24,5 +28,5 @@ branches:
- staging-test

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

1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ allprojects {

subprojects {
tasks.withType(Test) {
environment 'CLOUDINARY_URL', System.getProperty('CLOUDINARY_URL')
maxParallelForks = Runtime.runtime.availableProcessors()

// show standard out and standard error of the test JVM(s) on the console
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.cloudinary.Cloudinary;
import com.cloudinary.utils.ObjectUtils;
import com.cloudinary.utils.StringUtils;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;

import java.io.IOException;
import java.util.Map;
Expand All @@ -18,13 +17,13 @@ public class MockableTest {
protected Cloudinary cloudinary;

protected Object getParam(String name){
throw new NotImplementedException();
throw new UnsupportedOperationException();
}
protected String getURL(){
throw new NotImplementedException();
throw new UnsupportedOperationException();
}
protected String getHttpMethod(){
throw new NotImplementedException();
throw new UnsupportedOperationException();
}

protected Map preloadResource(Map options) throws IOException {
Expand Down

0 comments on commit 6dc1961

Please sign in to comment.