Only build on JDK8, targeting JDK7 compatibility though

Stupid errors in Travis make the build feedback not very useful
This commit is contained in:
R. Tyler Croy 2015-09-01 16:39:44 -07:00
parent 7b918d448a
commit 921ef7be64
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
2 changed files with 19 additions and 4 deletions

View File

@ -1,7 +1,5 @@
language: java
# Only the oraclejdk7 build on a tag will actually release
jdk:
- oraclejdk7
- oraclejdk8
# Using 'install' to run the clean to avoid Travis automatically calling

View File

@ -15,6 +15,23 @@ version = '0.4.0'
mainClassName = 'com.github.lookout.verspaetung.Main'
defaultTasks 'check', 'assemble'
/* Ensure we properly build for JDK7 still */
plugins.withType(JavaPlugin) {
sourceCompatibility = 1.7
targetCompatibility = 1.7
project.tasks.withType(JavaCompile) { task ->
task.sourceCompatibility = project.sourceCompatibility
task.targetCompatibility = project.targetCompatibility
}
project.tasks.withType(GroovyCompile) { task ->
task.sourceCompatibility = project.sourceCompatibility
task.targetCompatibility = project.targetCompatibility
}
}
////////////////////////////////////////////////////////////////////////////////
// TESTING
@ -147,10 +164,10 @@ bintray {
publish = true
/*
* Only only publish when we're tagging a release and if we've executed on
* the JDK7 build. This is to prevent multiple attempts by the build matrix
* a JDK8 build. This is to prevent multiple attempts by the build matrix
* to publish the artifacts
*/
dryRun = !((System.env.TRAVIS_TAG as boolean) && (System.env.TRAVIS_JDK_VERSION == 'oraclejdk7'))
dryRun = !((System.env.TRAVIS_TAG as boolean) && (System.env.TRAVIS_JDK_VERSION == 'oraclejdk8'))
configurations = ['archives']
pkg {