1- import org.gradle.internal.os.OperatingSystem
21import org.jlleitschuh.gradle.ktlint.reporter.ReporterType.CHECKSTYLE
3- import java.time.LocalDate
42
53plugins {
64 alias(libs.plugins.kotlin)
75 alias(libs.plugins.serialization)
86 alias(libs.plugins.ktlint)
7+ alias(libs.plugins.conveyor)
98 application
10- alias(libs.plugins.shadow)
11- alias(libs.plugins.runtime)
12- `maven- publish`
139}
1410
1511apply {
@@ -58,39 +54,16 @@ dependencies {
5854 testImplementation(libs.bundles.kotest)
5955}
6056
61- group = " io.github.paulgriffith "
57+ group = " io.github.inductiveautomation "
6258
6359application {
64- mainClass.set(" io.github.paulgriffith .kindling.MainPanel" )
60+ mainClass.set(" io.github.inductiveautomation .kindling.MainPanel" )
6561}
6662
6763tasks {
6864 test {
6965 useJUnitPlatform()
7066 }
71-
72- val cleanupJDeploy by registering(Delete ::class ) {
73- delete(" jdeploy" , " jdeploy-bundle" )
74- }
75- clean {
76- finalizedBy(cleanupJDeploy)
77- }
78-
79- shadowJar {
80- manifest {
81- attributes[" Main-Class" ] = " io.github.paulgriffith.kindling.MainPanel"
82- }
83- archiveBaseName.set(" kindling-bundle" )
84- archiveClassifier.set(" " )
85- archiveVersion.set(" " )
86- mergeServiceFiles()
87- }
88-
89- register(" printVersion" ) {
90- doLast { // add a task action
91- println (project.version)
92- }
93- }
9467}
9568
9669kotlin {
@@ -102,78 +75,3 @@ ktlint {
10275 reporter(CHECKSTYLE )
10376 }
10477}
105-
106- runtime {
107- options.set(listOf (" --strip-debug" , " --compress" , " 2" , " --no-header-files" , " --no-man-pages" ))
108-
109- modules.set(
110- listOf (
111- " java.desktop" ,
112- " java.sql" ,
113- " java.logging" ,
114- " java.naming" ,
115- " java.xml" ,
116- " jdk.zipfs" ,
117- ),
118- )
119-
120- jpackage {
121- val currentOs = OperatingSystem .current()
122- val imgType = if (currentOs.isWindows) " ico" else " png"
123- appVersion = project.version.toString()
124- imageOptions = listOf (" --icon" , " src/main/resources/icons/ignition.$imgType " )
125- val options: Map <String , String ?> = buildMap {
126- put(" resource-dir" , " src/main/resources" )
127- put(" vendor" , " Paul Griffith" )
128- put(" copyright" , LocalDate .now().year.toString())
129- put(" description" , " A collection of useful tools for troubleshooting Ignition" )
130-
131- when {
132- currentOs.isWindows -> {
133- put(" win-per-user-install" , null )
134- put(" win-dir-chooser" , null )
135- put(" win-menu" , null )
136- put(" win-shortcut" , null )
137- // random (consistent) UUID makes upgrades smoother
138- put(" win-upgrade-uuid" , " 8e7428c8-bbc6-460a-9995-db6d8b04a690" )
139- }
140-
141- currentOs.isLinux -> {
142- put(" linux-shortcut" , null )
143- }
144- }
145- }
146-
147- // add-exports is used to bypass Java modular restrictions
148- jvmArgs = listOf (" --add-exports" , " java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED" )
149-
150- installerOptions = options.flatMap { (key, value) ->
151- listOfNotNull(" --$key " , value)
152- }
153-
154- imageName = " kindling"
155- installerName = " kindling"
156- mainJar = " kindling-bundle.jar"
157- }
158- }
159-
160- configure<PublishingExtension > {
161- repositories {
162- maven {
163- name = " GitHubPackages"
164- url = uri(" https://maven.pkg.github.com/paul-griffith/kindling" )
165- credentials {
166- username = System .getenv(" GITHUB_ACTOR" )
167- password = System .getenv(" GITHUB_TOKEN" )
168- }
169- }
170- }
171- publications {
172- register<MavenPublication >(" gpr" ) {
173- from(components[" kotlin" ])
174- pom {
175- description.set(" Kindling core API and first-party tools, packaged for ease of extension by third parties." )
176- }
177- }
178- }
179- }
0 commit comments