Skip to content

Commit

Permalink
[#610] Build: use minimal target java version for the current JDK
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Jan 17, 2019
1 parent 01f1bfb commit c959a39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jdk:
#
# - openjdk6 # gradle 3.1 requires java 7

matrix:
allow_failures:
- jdk: oraclejdk-ea

before_script:
- chmod +x gradlew
# for CodeClimate
Expand Down
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ allprojects {
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'java-library' // to avoid https://github.com/gradle/gradle/issues/1118
sourceCompatibility = 1.5
targetCompatibility = 1.5
sourceCompatibility = !org.gradle.api.JavaVersion.current().isJava9Compatible() ?
1.5 : org.gradle.api.JavaVersion.current().isJava11Compatible() ? 1.7 : 1.6
targetCompatibility = !org.gradle.api.JavaVersion.current().isJava9Compatible() ?
1.5 : org.gradle.api.JavaVersion.current().isJava11Compatible() ? 1.7 : 1.6

repositories {
jcenter()
Expand Down

0 comments on commit c959a39

Please sign in to comment.