-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
77 lines (64 loc) · 1.7 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
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.13'
id 'org.beryx.jlink' version '2.25.0'
}
version = '1.0'
archivesBaseName = 'AsciiImage'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
javafx {
version = "19"
modules = [ 'javafx.controls' , 'javafx.swing' ]
}
repositories {
mavenCentral()
}
dependencies {
// runtimeOnly "org.openjfx:javafx-graphics:$javafx.version:win"
// runtimeOnly "org.openjfx:javafx-graphics:$javafx.version:linux"
// runtimeOnly "org.openjfx:javafx-graphics:$javafx.version:mac"
}
application {
mainClass = 'AsciiImage.Main'
mainModule = 'AsciiImage'
}
jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
imageName = 'AsciiImage'
launcher{
name = 'Launch'
noConsole = true
windowsScriptTemplate = file('templates/wintemplate.txt')
unixScriptTemplate = file('templates/unixtemplate.txt')
}
}
tasks.jlink.doLast {
delete("${buildDir}\\AsciiImage\\release")
copy {
from("${buildDir}\\AsciiImage\\bin\\Launch")
into("${buildDir}\\AsciiImage")
rename('Launch', 'Launch.sh')
}
copy {
from("${buildDir}\\AsciiImage\\bin\\Launch.bat")
into("${buildDir}\\AsciiImage")
}
delete("${buildDir}\\AsciiImage\\bin\\Launch")
delete("${buildDir}\\AsciiImage\\bin\\Launch.bat")
}
jar {
manifest {
attributes([
'Main-Class': 'AsciiImage.Main',
'Implementation-Title': 'AsciiImage',
'Implementation-Version': version,
'Built-By': 'WispySparks'
])
}
}
defaultTasks 'clean'