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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "net.sf.proguard:proguard-gradle:6.1.1"
}
}
if(JavaVersion.current() == JavaVersion.VERSION_1_8) {
['rt.jar',
'jsse.jar',
'i386/default/jclSC170/vm.jar',
'amd64/default/jclSC170/vm.jar',
'ibmcertpathfw.jar',
'math.jar'].each {
def jfile = searchFile(["${System.properties['java.home']}"], ["${it}", "lib/${it}", "jre/lib/${it}"])
if(jfile) {
project.ext.libJars << jfile
}
}
if(hasJavaFx) {
project.ext.libJars << "${System.properties['java.home']}/${javafxJar}"
}
}
else {
['java.base.jmod',
'java.xml.jmod',
'java.desktop.jmod',
'java.prefs.jmod',
'java.naming.jmod',
'java.datatransfer.jmod',
'jdk.unsupported.desktop.jmod',
'javafx.base.jmod',
'javafx.controls.jmod',
'javafx.graphics.jmod',
'javafx.swing.jmod',
'java.logging.jmod'].each {
project.ext.libJars << "${System.properties['java.home']}/jmods/${it}"
}
}
task proguardJar(type: proguard.gradle.ProGuardTask, dependsOn: jar) {
injars configurations.runtimeClasspath.resolve(), filter: "!META-INF/**"
injars "${projectDir}/build/libs/${tmpJarName}"
outjars "${libDir}/${jarName}"
libraryjars project.ext.libJars
configuration 'icegridgui.pro'
}
task copyJars(type: Copy, dependsOn: proguardJar) {
from new File("${libDir}/${jarName}")
into "${DESTDIR}${jarDir}"
}
task install(dependsOn: copyJars)
assemble.dependsOn(proguardJar)
|