mirror of
https://github.com/corda/corda.git
synced 2024-12-27 16:28:56 +00:00
50 lines
1010 B
Groovy
50 lines
1010 B
Groovy
repositories {
|
|
maven {
|
|
url "$artifactory_contextUrl/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
|
|
}
|