-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
80 lines (67 loc) · 2.04 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
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
plugins {
id 'java'
id 'application'
id 'org.beryx.jlink' version '2.25.0'
}
sourceCompatibility = 17
targetCompatibility = 17
mainClassName = 'fr.fenrur.Main'
group 'fr.fenrur'
version '2.0'
application {
mainModule = 'fr.fenrur'
mainClass = 'fr.fenrur.Main'
}
jar {
manifest {
attributes 'Main-Class': 'fr.fenrur.Main'
}
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
def currentOS = DefaultNativePlatform.currentOperatingSystem;
def platform
if (currentOS.isWindows()) {
platform = 'win'
} else if (currentOS.isLinux()) {
platform = 'linux'
} else if (currentOS.isMacOsX()) {
platform = 'mac'
}
def javafxVersion = "19"
java {
modularity.inferModulePath = true
}
dependencies {
implementation ('org.jfxtras:jmetro:11.6.16') {
exclude group: 'org.openjfx', module: 'javafx-base'
exclude group: 'org.openjfx', module: 'javafx-controls'
exclude group: 'org.openjfx', module: 'javafx-graphics'
exclude group: 'org.openjfx', module: 'javafx-fxml'
}
implementation "org.openjfx:javafx-base:${javafxVersion}:${platform}"
implementation "org.openjfx:javafx-controls:${javafxVersion}:${platform}"
implementation "org.openjfx:javafx-graphics:${javafxVersion}:${platform}"
implementation "org.openjfx:javafx-fxml:${javafxVersion}:${platform}"
implementation 'com.github.Dansoftowner:jSystemThemeDetector:3.8'
}
jlink {
application.mainModule = "fr.fenrur"
options = ['--bind-services', '--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'Environment Variables'
noConsole = true
}
jpackage {
def currentOs = org.gradle.internal.os.OperatingSystem.current()
def imgType = currentOs.macOsX ? 'icns' : 'png'
icon = "icons/favicon.$imgType"
installerOptions += [
'--vendor', 'Fenrur',
'--app-version', version
]
}
}