-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
114 lines (97 loc) · 2.94 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
114
plugins {
id 'java'
id 'application'
id 'org.javamodularity.moduleplugin' version '1.8.12'
id 'org.openjfx.javafxplugin' version '0.0.13'
id 'org.beryx.jlink' version '3.1.1'
}
group 'tech.anonymoushacker1279'
version '1.1.0'
apply from: 'optimization_utils.gradle'
def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}
java.toolchain.languageVersion = JavaLanguageVersion.of(23)
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://maven.anonymoushacker1279.tech/releases"
}
maven {
url "https://maven.anonymoushacker1279.tech/snapshots"
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
application {
mainModule = 'tech.anonymoushacker1279.marshallcodeampinterface'
mainClass = 'tech.anonymoushacker1279.marshallcodeampinterface.CODEInterfaceApplication'
}
javafx {
version = '23.0.1'
modules = ['javafx.controls', 'javafx.fxml', 'javafx.media']
}
dependencies {
implementation 'org.jetbrains:annotations:26.0.1'
implementation "tech.anonymoushacker1279:OrionBLE:1.0.0:all"
implementation 'io.github.mkpaz:atlantafx-base:2.0.1'
implementation 'org.apache.logging.log4j:log4j-core:2.24.3'
implementation 'org.apache.commons:commons-math3:3.6.1'
implementation 'org.semver4j:semver4j:5.5.0'
}
run {
// Add RUNNING_IN_IDE environment variable to the run configuration
environment 'RUNNING_IN_IDE', 'true'
}
tasks.named('processResources', ProcessResources).configure {
LinkedHashMap<String, String> replaceProperties = [
version: version, commit: getGitHash()
]
inputs.properties replaceProperties
filesMatching(['**/app.properties']) {
expand replaceProperties + [project: project]
}
}
jlink {
imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip")
options = ['--strip-debug', '--compress', 'zip-9', '--no-header-files', '--no-man-pages']
launcher {
name = 'CODE Amp Interface'
}
forceMerge('annotations')
forceMerge('OrionBLE')
jpackage {
targetPlatformName = 'win'
if (targetPlatformName == 'win') {
targetPlatform("win") {}
installerType = 'msi'
}
installerOptions = [
'--name', 'CODE Amp Interface',
'--description', "A desktop program to modify amp settings without needing to use the Marshall Gateway app.",
'--vendor', 'AnonymousHacker1279',
'--copyright', 'Copyright (c) 2025 Nicholas Smit',
'--about-url', 'https://github.com/AnonymousHacker1279/MarshallCodeAmpInterface',
'--license-file', 'LICENSE'
]
if (installerType == 'msi') {
imageOptions += ['--icon', 'src/main/resources/tech/anonymoushacker1279/marshallcodeampinterface/images/installer_icon.ico']
installerOptions += [
'--win-dir-chooser',
'--win-menu',
'--win-shortcut-prompt',
'--win-help-url', 'https://github.com/AnonymousHacker1279/MarshallCodeAmpInterface'
]
}
}
}
jlinkZip {
group = 'distribution'
}