-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
114 lines (95 loc) · 2.78 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import org.gradle.internal.os.OperatingSystem
plugins {
id 'java'
id 'application'
id "com.github.johnrengelman.shadow" version "8.1.1"
id "org.beryx.runtime" version "1.13.1"
}
java {
sourceCompatibility = '17'
targetCompatibility = '17'
}
group 'jp.ac.aoyama.it.ke.mrcube'
version = '24.5.1'
application {
mainClass.set('jp.ac.aoyama.it.ke.mrcube.MR3')
}
project.ext {
moduleName = 'jp.ac.aoyama.it.ke'
artifactId = 'mrcube'
defaultEncoding = 'UTF-8'
}
repositories {
mavenCentral()
}
wrapper {
gradleVersion = '8.6'
}
jar {
manifest {
attributes 'Main-Class': 'jp.ac.aoyama.it.ke.mrcube.MR3'
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Test) {
systemProperty 'file.encoding', 'UTF-8'
}
tasks.withType(JavaExec) {
systemProperty 'file.encoding', 'UTF-8'
}
test {
useJUnitPlatform()
}
shadowJar {
mergeServiceFiles()
manifest {
attributes 'Main-Class': 'jp.ac.aoyama.it.ke.mrcube.MR3'
}
}
runtime {
enableCds()
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
imageDir = layout.buildDirectory.dir("mrcube-${version}")
imageZip = layout.buildDirectory.file("mrcube-${version}.zip")
jpackage {
if (OperatingSystem.current().isWindows()) {
jpackageHome = 'C:\\Program Files\\Java\\jdk-21.0.3'
imageOptions = ['--icon', './src/main/resources/images/mr3.ico']
installerType = 'msi'
installerOptions = ['--vendor', 'Takeshi Morita', '--win-shortcut']
} else if (OperatingSystem.current().isMacOsX()) {
jpackageHome = '/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home'
imageOptions = ['--verbose', '--icon', './src/main/resources/images/mr3.icns']
}
imageName = "mrcube-${version}"
skipInstaller = false
installerName = "mrcube"
}
}
tasks.runtime.doLast {
copy {
from('./README.md')
into(layout.buildDirectory.file("mrcube-${version}"))
}
copy {
from('./README.ja.md')
into(layout.buildDirectory.file("mrcube-${version}"))
}
copy {
from('./LICENSE')
into(layout.buildDirectory.file("mrcube-${version}"))
}
}
dependencies {
implementation 'com.formdev:flatlaf:3.4.1'
implementation 'jgraph:jgraph:5.13.0.0'
implementation 'org.apache.jena:jena-core:5.0.0'
implementation 'org.apache.jena:jena-arq:5.0.0'
implementation 'org.slf4j:slf4j-simple:2.0.0'
implementation 'org.apache.xmlgraphics:batik-svg-dom:1.17'
implementation 'org.apache.xmlgraphics:batik-svggen:1.17'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
}