forked from ClassViewer/ClassViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
47 lines (39 loc) · 1.17 KB
/
build.gradle
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
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
}
plugins {
id 'java'
id "org.javamodularity.moduleplugin" version "1.6.0"
id 'org.beryx.jlink' version '2.16.4'
}
group 'org.glavo'
version '4.0-beta1'
modularity.mixedJavaRelease 8
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
mavenCentral()
}
jar {
manifest {
attributes 'Implementation-Version': '1.2',
'Main-Class': 'org.glavo.viewer.Main'
}
}
compileJava.options.encoding = "UTF-8"
mainClassName = 'org.glavo.viewer/org.glavo.viewer.Main'
//jlink --strip-debug --no-header-files --no-man-pages --module-path ClassViewer-4.x.jar --add-modules org.glavo.viewer --output ClassViewer --strip-native-commands --vm=client
jlink {
moduleName = 'org.glavo.viewer'
imageDir = file("$buildDir/ClassViewer")
addOptions '--strip-debug',
'--no-header-files',
'--no-man-pages',
'--strip-native-commands',
'--vm=client'
project.tasks.getByName('jlink').doLast {
delete "$imageDir/bin/ClassViewer"
delete "$imageDir/bin/ClassViewer.bat"
}
}