corda/jdk8u-deterministic/build.gradle
Ronan Browne b410cd2a5d
ES-853: update Artifactory refrences to new public location (#7416)
* ES-853: update artifactory references to new public location
2023-07-12 17:36:57 +01:00

50 lines
1005 B
Groovy

repositories {
maven {
url "$publicArtifactURL/corda-dependencies"
}
}
ext {
jdk_home = "$projectDir/jdk".toString()
rt_jar = "$jdk_home/jre/lib/rt.jar".toString()
}
configurations {
jdk
}
dependencies {
jdk "net.corda:deterministic-rt:$deterministic_rt_version:api"
}
def copyJdk = tasks.register('copyJdk', Copy) {
outputs.dir jdk_home
from(configurations.jdk) {
rename 'deterministic-rt-(.*).jar', 'rt.jar'
}
into "$jdk_home/jre/lib"
doLast {
def eol = System.lineSeparator()
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
}
}
}
tasks.named('assemble') {
dependsOn copyJdk
}
tasks.named('jar', Jar) {
enabled = false
}
artifacts {
jdk file: file(rt_jar), type: 'jar', builtBy: copyJdk
}