mirror of
https://github.com/corda/corda.git
synced 2024-12-24 15:16:45 +00:00
a4d2acbea2
* Expand the deterministic JDK image to make it friendlier to IntelliJ. * Fix Gradle always to use the latest deterministic rt.jar available. * Write JDK items directly from Gradle.
48 lines
1.0 KiB
Groovy
48 lines
1.0 KiB
Groovy
repositories {
|
|
maven {
|
|
url "$artifactory_contextUrl/corda-releases"
|
|
}
|
|
maven {
|
|
url "$artifactory_contextUrl/corda-dev"
|
|
}
|
|
}
|
|
|
|
ext {
|
|
jdk_home = "$projectDir/jdk".toString()
|
|
rt_jar = "$jdk_home/jre/lib/rt.jar".toString()
|
|
}
|
|
|
|
configurations {
|
|
jdk.resolutionStrategy {
|
|
cacheChangingModulesFor 0, 'seconds'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// Ensure everyone uses the latest SNAPSHOT.
|
|
jdk "net.corda:deterministic-rt:latest.integration:api"
|
|
}
|
|
|
|
task copyJdk(type: Copy) {
|
|
outputs.dir jdk_home
|
|
|
|
from(configurations.jdk.asPath) {
|
|
rename 'deterministic-rt-(.*).jar', 'rt.jar'
|
|
}
|
|
into "$jdk_home/jre/lib"
|
|
|
|
doLast {
|
|
def eol = System.getProperty('line.separator')
|
|
file("$jdk_home/release").write "JAVA_VERSION=\"1.8.0_172\"$eol"
|
|
mkdir "$jdk_home/bin"
|
|
file("$jdk_home/bin/javac").with {
|
|
write "#!/bin/sh\necho \"javac 1.8.0_172\"\n"
|
|
setExecutable true, false
|
|
return
|
|
}
|
|
}
|
|
}
|
|
|
|
assemble.dependsOn copyJdk
|
|
jar.enabled = false
|