-
Notifications
You must be signed in to change notification settings - Fork 268
/
Copy pathbuild.gradle
55 lines (48 loc) · 1.75 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
48
49
50
51
52
53
54
55
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.beryx.jlink' version '2.12.0'
// https://github.com/openjfx/javafx-gradle-plugin/issues/90
// id 'org.openjfx.javafxplugin' version '0.0.9'
}
javafx {
modules = [ 'javafx.controls', 'javafx.fxml' ]
}
dependencies {
implementation project(':classpy-common')
implementation project(':classpy-classfile')
implementation project(':classpy-binarychunk')
implementation project(':classpy-bitcoin')
implementation project(':classpy-wasm')
// implementation project(':utilities')
// testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.1'
// testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
application {
mainModule = 'classpy.gui'
mainClass = 'com.github.zxh.classpy.gui.ClasspyApp'
}
// https://stackoverflow.com/questions/51864473/where-do-resource-files-go-in-a-gradle-project-that-builds-a-java-9-module/51921521
sourceSets {
main {
output.setResourcesDir(java.outputDir)
}
}
// https://www.baeldung.com/gradle-fat-jar
// https://stackoverflow.com/questions/57452363/building-fatjar-for-javafx-with-gradle-and-intellij-getting-noclassdeffounderro
// https://stackoverflow.com/questions/52569724/javafx-11-create-a-jar-file-with-gradle
task fatJar(type: Jar) {
manifest {
attributes 'Main-Class': 'com.github.zxh.classpy.gui.Main'
}
archiveBaseName = 'classpy-fat-jar'
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
mainClassName = "$moduleName/com.github.zxh.classpy.gui.ClasspyApp"
jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'classpy'
}
}