-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
106 lines (80 loc) · 3.02 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
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
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
plugins {
`java-library`
application
id("com.github.ben-manes.versions") version ("0.50.0")
id("edu.sc.seis.launch4j") version ("3.0.5")
kotlin("jvm") version ("1.9.21")
}
group = "dev.blocky.app.vx"
version = "1.0.1"
description = "General utility program written in Java."
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib"))
implementation("org.openjfx:javafx-base:21.0.1:win")
implementation("org.openjfx:javafx-graphics:21.0.1:win")
implementation("org.openjfx:javafx-controls:21.0.1:win")
implementation("org.openjfx:javafx-media:21.0.1:win")
implementation("org.openjfx:javafx-web:21.0.1:win")
implementation("org.openjfx:javafx-swing:21.0.1:win")
implementation("net.java.dev.jna:jna-platform:5.14.0")
api("org.kohsuke:github-api:1.318")
api("org.json:json:20231013")
api("net.lingala.zip4j:zip4j:2.11.5")
api("com.google.zxing:core:3.5.2")
api("com.google.zxing:javase:3.5.2")
api("org.controlsfx:controlsfx:11.2.0")
api("org.apache.commons:commons-lang3:3.14.0")
api("commons-io:commons-io:2.15.1")
api("commons-codec:commons-codec:1.16.0")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
application {
mainModule.set("dev.blocky.app.vx")
mainClass.set("dev.blocky.app.vx.Main")
}
launch4j {
outfile = "vxar.exe"
mainClassName = "dev.blocky.app.vx.Main"
outputDir = "D:\\VorteX-Builds"
libraryDir = "D:\\VorteX-Builds\\lib"
icon = "${projectDir}/src/main/resources/assets/icons/icon.ico"
bundledJrePath = System.getenv("JAVA_HOME")
jreMinVersion = "17"
version = project.version.toString()
textVersion = project.version.toString()
copyright = "Copyright (C) 2023 BlockyDotJar (aka. Dominic R.)"
downloadUrl = "https://www.oracle.com/java/technologies/downloads/#jdk17-windows"
}
tasks.withType<Jar> {
manifest {
attributes["Main-Module"] = "dev.blocky.app.vx"
attributes["Main-Class"] = "dev.blocky.app.vx.Main"
attributes["Automatic-Module-Name"] = "VorteX"
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(configurations.compileClasspath.map { config -> config.map { if (it.isDirectory) it else zipTree(it) } })
}
tasks.withType<JavaCompile> {
doFirst {
options.compilerArgs.addAll(arrayOf("--module-path", classpath.asPath, "--add-modules", "javafx.base,javafx.controls,javafx.graphics,javafx.media,javafx.web,javafx.swing"))
}
}
tasks.withType<DependencyUpdatesTask> {
gradleReleaseChannel = "current"
rejectVersionIf {
isNonStable(candidate.version) && !isNonStable(currentVersion)
}
}
fun isNonStable(version: String): Boolean {
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(version)
return isStable.not()
}