mirror of
https://github.com/corda/corda.git
synced 2024-12-21 05:53:23 +00:00
52 lines
1.1 KiB
Groovy
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.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
|
|
}
|
|
}
|
|
}
|
|
|
|
assemble.dependsOn copyJdk
|
|
jar.enabled = false
|
|
|
|
artifacts {
|
|
jdk file: file(rt_jar), type: 'jar', builtBy: copyJdk
|
|
}
|