-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Target Java 8 in Java 9 build #4037
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.gradle | ||
.idea | ||
.project | ||
.remote-libs/ | ||
.settings | ||
.checkstyle | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,18 +11,27 @@ mainClassName = 'org.triplea.game.headed.runner.HeadedGameRunner' | |
version = getEngineVersion() | ||
|
||
ext { | ||
javaFxRuntimeUrl = 'https://github.com/triplea-game/assets/raw/master/javafx/jfxrt-1.8.0_181.jar' | ||
releasesDir = file("$buildDir/releases") | ||
testFxVersion = '4.0.13-alpha' | ||
} | ||
|
||
dependencies { | ||
compile project(':game-core') | ||
|
||
if (JavaVersion.current() >= JavaVersion.VERSION_1_9) { | ||
compileOnly remoteLib(javaFxRuntimeUrl) | ||
} | ||
|
||
testCompile project(':test-common') | ||
testCompile "org.sonatype.goodies:goodies-prefs:$sonatypeGoodiesPrefsVersion" | ||
testCompile "org.testfx:testfx-core:$testFxVersion" | ||
testCompile "org.testfx:testfx-junit5:$testFxVersion" | ||
|
||
if (JavaVersion.current() >= JavaVersion.VERSION_1_9) { | ||
testCompileOnly remoteLib(javaFxRuntimeUrl) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, the |
||
} | ||
|
||
if (JavaVersion.current() == JavaVersion.VERSION_1_9) { | ||
testRuntimeOnly 'org.testfx:openjfx-monocle:jdk-9+181' | ||
} else if (JavaVersion.current() == JavaVersion.VERSION_1_8) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import java.nio.file.Paths | ||
|
||
import de.undercouch.gradle.tasks.download.DownloadAction | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath group: 'de.undercouch', name: 'gradle-download-task', version: '3.4.3' | ||
} | ||
} | ||
|
||
def remoteLibsDir = file('.remote-libs') | ||
|
||
ext.remoteLib = { url -> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, I had to re-introduce this functionality in order to download the JavaFX dependency from the |
||
def file = file("$remoteLibsDir/${Paths.get(new URI(url).path).fileName}") | ||
def download = new DownloadAction(project) | ||
download.src url | ||
download.dest file | ||
download.overwrite false | ||
download.execute() | ||
files(file) | ||
} | ||
|
||
task cleanRemoteLibs( | ||
type: Delete, | ||
group: LifecycleBasePlugin.BUILD_GROUP, | ||
description: 'Deletes the remote libraries directory.') { | ||
delete remoteLibsDir | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a regression from when I was consolidating the buildscripts. The
sourceCompatibility
andtargetCompatibility
properties must be set after thejava
plugin is applied, otherwise they will be overwritten with the version of the running JVM.