generated from fastjengine/fastj-kotlin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
74 lines (62 loc) · 2.24 KB
/
build.gradle.kts
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
plugins {
application
kotlin("jvm") version "1.5.20"
id("org.beryx.runtime") version "1.12.5"
}
group = "tech.fastj.fastjengine"
version = "0.0.1"
description = "View FastJ .psdf files."
application.mainClass.set("tech.fastj.template.MainKt")
repositories.maven { setUrl("https://jitpack.io/") }
repositories.mavenCentral()
sourceSets.main { java.srcDirs("src/main/java", "src/main/kotlin") }
dependencies.implementation("com.github.fastjengine:FastJ:1.6.0-SNAPSHOT")
runtime {
options.addAll(
"--strip-debug",
"--compress", "2",
"--no-header-files",
"--no-man-pages"
)
launcher {
noConsole = true
}
jpackage {
val iconPath = "project-resources/fastj_icon"
val currentOs = org.gradle.internal.os.OperatingSystem.current()
when {
currentOs.isWindows -> {
installerType = "msi"
imageOptions = listOf("--icon", "${iconPath}.ico")
installerOptions = listOf(
"--description", project.description as String,
"--vendor", project.group as String,
"--app-version", project.version as String,
"--win-per-user-install",
"--win-dir-chooser",
"--win-shortcut",
)
}
currentOs.isLinux -> {
installerType = "deb"
imageOptions = listOf("--icon", "${iconPath}.png")
installerOptions = listOf(
"--description", project.description as String,
"--vendor", project.group as String,
"--app-version", project.version as String,
"--linux-shortcut",
)
}
currentOs.isMacOsX -> {
installerType = "pkg"
imageOptions = listOf("--icon", "${iconPath}.icns")
installerOptions = listOf(
"--description", project.description as String,
"--vendor", project.group as String,
"--app-version", project.version as String,
"--mac-package-name", project.name
)
}
}
}
}