blob: d9ceafb0b65cd6b28e04ad9546fc77c8cef22a6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
version '8.92'
ext.download = makeDownloadTask(
url: "http://ftp.heanet.ie/mirrors/funtoo/distfiles/oracle-java/jdk-" +
"${project.version.asType(String).replace('.', 'u')}-linux-x64.tar.gz",
sha256: '79a3f25e9b466cb9e969d1772ea38550de320c88e9119bf8aa11ce8547c39987')
apply from: '../oracle.gradle'
tasks.untar.doLast {
// delete JCE policies, see unpackJce
project.delete("${buildDir}/unpacked/dist/jre/lib/security/local_policy.jar")
project.delete("${buildDir}/unpacked/dist/jre/lib/security/US_export_policy.jar")
}
final downloadJce = makeDownloadTask(
url: 'http://enos.itcollege.ee/~jpoial/allalaadimised/jdk8/jce_policy-8.zip',
sha256: 'f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59')
task unpackJce(type: Copy) {
into file("${buildDir}/unpacked/dist/jre/lib/security")
from zipTree(downloadJce.dest)
eachFile { FileCopyDetails fcd ->
fcd.path = fcd.path.substring(path.indexOf('/') + 1)
}
}
tasks.unpackJce.dependsOn(downloadJce)
tasks.unpackJce.mustRunAfter(tasks.untar)
ospackage {
into '/usr/lib/jvm/java-8-oraclejdk'
from unpackJce.outputs.files
}
activator.env['JAVA_HOME'] = '/usr/lib/jvm/java-8-oraclejdk'
tasks.getByName('activator').doFirst {
file("${buildDir}/unpacked/dist/bin").list().each {
activator.bin[it] = "/usr/lib/jvm/java-8-oraclejdk/bin/${it}"
}
}
|