corda/jdk8u-deterministic/build.gradle
Chris Rankin 329c9da0a9
CID-251: Integrate DJVM with Corda's existing deterministic-rt. (#3846)
* Integrate DJVM with Corda's existing deterministic-rt.
* Remove generated whitelists from DJVM.
* Fix Manifest attributes, disable jar tasks and attach shadowJar to assemble task.
2018-08-24 15:51:40 +01:00

52 lines
1.1 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) {
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
artifacts {
jdk file: file(rt_jar), type: 'jar', builtBy: copyJdk
}