Skip to content

Commit 52fbf01

Browse files
Package restructure and initial impl of conveyor (#1)
1 parent bf963b2 commit 52fbf01

File tree

81 files changed

+376
-483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+376
-483
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/delete-package-versions@v4
2222
with:
2323
package-version-ids: ${{ env.project_version }}
24-
package-name: 'io.github.paulgriffith.kindling'
24+
package-name: 'io.github.inductiveautomation.kindling'
2525
package-type: 'maven'
2626
continue-on-error: true
2727
- name: Publish to Github Packages

.github/workflows/release.yml

Lines changed: 0 additions & 75 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
.idea/
44

55
**build/
6-
jdeploy/
7-
jdeploy-bundle/
6+
7+
output/

NOTICES

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
NOTICES
2+
3+
This repository incorporates material as listed below or described in the code.
4+
5+
### Build Dependencies
6+
- Java - GPL license 2.0
7+
- Kotlin - Apache License 2.0 - https://github.com/JetBrains/kotlin/blob/master/license/LICENSE.txt
8+
- Kotlin Coroutines - Apache License 2.0 - https://github.com/Kotlin/kotlinx.coroutines/blob/master/LICENSE.txt
9+
- Kotlin Serialization - Apache License 2.0 - https://github.com/Kotlin/kotlinx.serialization/blob/master/LICENSE.txt
10+
- Gradle - Apache License 2.0 - https://docs.gradle.org/current/userguide/licenses.html
11+
- Ktlint Gradle Plugin - MIT License - https://github.com/JLLeitschuh/ktlint-gradle/blob/master/LICENSE.txt
12+
- Ktlint - MIT License - https://github.com/pinterest/ktlint/blob/master/LICENSE
13+
14+
### Core Dependencies
15+
- FlatLaf - Apache License 2.0 - https://github.com/JFormDesigner/FlatLaf/blob/main/LICENSE
16+
- SQLite - Public Domain - https://www.sqlite.org/copyright.html
17+
- Xerial JDBC Driver - Apache License 2.0 - https://github.com/xerial/sqlite-jdbc/blob/master/LICENSE
18+
- Logback - Eclipse Public License 1.0 - https://logback.qos.ch/license.html
19+
- HyperSQL - Modified BSD License - https://hsqldb.org/web/hsqlLicense.html
20+
- ExcelKt - MIT License - https://github.com/evanrupert/ExcelKt/blob/master/LICENSE
21+
- MigLayout - BSD License - http://miglayout.com/
22+
- SvgSalamander - BSD License - https://github.com/JFormDesigner/svgSalamander/blob/master/licenses/license-BSD.txt
23+
- Jide Common Layer - GPL with classpath exception - http://www.jidesoft.com/products/oss.htm
24+
- JSystemThemeDetector - Apache License 2.0 - https://github.com/Dansoftowner/jSystemThemeDetector/blob/master/LICENSE
25+
- RSyntaxTextArea - BSD 3-Clause - https://github.com/bobbylight/RSyntaxTextArea/blob/master/LICENSE.md
26+
27+
### Test Dependencies
28+
- Kotest - Apache License 2.0 - https://github.com/kotest/kotest/blob/master/LICENSE
29+
30+
### Assets
31+
- BoxIcons - MIT License - https://boxicons.com/usage#license

build.gradle.kts

Lines changed: 3 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
import org.gradle.internal.os.OperatingSystem
21
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType.CHECKSTYLE
3-
import java.time.LocalDate
42

53
plugins {
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

1511
apply {
@@ -58,39 +54,16 @@ dependencies {
5854
testImplementation(libs.bundles.kotest)
5955
}
6056

61-
group = "io.github.paulgriffith"
57+
group = "io.github.inductiveautomation"
6258

6359
application {
64-
mainClass.set("io.github.paulgriffith.kindling.MainPanel")
60+
mainClass.set("io.github.inductiveautomation.kindling.MainPanel")
6561
}
6662

6763
tasks {
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

9669
kotlin {
@@ -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-
}

buildSrc/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM debian:latest
2+
3+
RUN wget https://downloads.hydraulic.dev/conveyor/hydraulic-conveyor_8.1_amd64.deb \
4+
&& apt install ./hydraulic-conveyor_8.1_amd64.deb
5+
6+
ENTRYPOINT /bin/sh

ci.conveyor.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
include required("conveyor.conf")
2+
3+
app {
4+
signing-key = ${env.SIGNING_KEY}
5+
6+
mac.certificate = apple.cer
7+
windows.certificate = windows.cer
8+
9+
mac.notarization {
10+
app-specific-password = ${env.APPLE_ASP}
11+
team-id = TODO
12+
apple-id = "TODO"
13+
}
14+
}

conveyor.conf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// This is a hashbang include. You can run the command after the #! to see what
2+
// configuration is being extracted from the Gradle build using the Conveyor plugin.
3+
include "#!./gradlew -q printConveyorConfig"
4+
5+
include required("https://raw.githubusercontent.com/hydraulic-software/conveyor/master/configs/jvm/extract-native-libraries.conf")
6+
7+
app {
8+
version = "1.0.0"
9+
// The base URL is where the download site will be placed. Packages will check here for updates.
10+
site.base-url = "localhost:3000"
11+
12+
// This is optional. If not specified the last component of the rdns name will be turned into a display name.
13+
display-name = "Kindling"
14+
15+
// A global identifier for the app.
16+
rdns-name = "io.github.inductiveautomation.kindling"
17+
18+
jvm {
19+
modules += java.desktop
20+
modules += java.sql
21+
modules += java.logging
22+
modules += java.naming
23+
modules += java.xml
24+
modules += jdk.zipfs
25+
26+
options += "--add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED"
27+
options += "--add-exports=java.base/sun.security.action=ALL-UNNAMED"
28+
options += "--add-exports=java.desktop/apple.laf=ALL-UNNAMED"
29+
options += "--add-reads=com.formdev.flatlaf.extras=ALL-UNNAMED"
30+
}
31+
32+
// icons = "icons/icon.svg"
33+
}
34+
35+
conveyor.compatibility-level = 8

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version=0.6.2-SNAPSHOT
1+
version=1.0.0-SNAPSHOT
22
org.gradle.jvmargs=-Xmx2G

gradle/libs.versions.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
[versions]
22
java = "17"
33
kotlin = "1.8.21"
4-
coroutines = "1.6.4"
4+
coroutines = "1.7.0-RC"
55
flatlaf = "3.1.1"
66
kotest = "5.6.1"
77
ignition = "8.1.1"
88

99
[plugins]
1010
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
1111
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
12+
conveyor = { id = "dev.hydraulic.conveyor", version = "1.5" }
1213
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version = "11.3.2" }
13-
shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }
14-
runtime = { id = "org.beryx.runtime", version = "1.13.0" }
1514

1615
[libraries]
1716
# core functionality
@@ -35,7 +34,7 @@ flatlaf-jide = { group = "com.formdev", name = "flatlaf-jide-oss", version.ref =
3534
flatlaf-swingx = { group = "com.formdev", name = "flatlaf-swingx", version.ref = "flatlaf" }
3635
svgSalamander = { group = "com.formdev", name = "svgSalamander", version = "1.1.4" }
3736
jide-common = { group = "com.formdev", name = "jide-oss", version = "3.7.12" }
38-
swingx = { group = "org.swinglabs.swingx", name = "swingx-core", version = "1.6.5-1" }
37+
swingx = { group = "org.swinglabs.swingx", name = "swingx-all", version = "1.6.5-1" }
3938
osthemedetector = { group = "com.github.Dansoftowner", name = "jSystemThemeDetector", version = "3.8" }
4039
rsyntaxtextarea = { group = "com.fifesoft", name = "rsyntaxtextarea", version = "3.3.3" }
4140
jfreechart = { group = "org.jfree", name = "jfreechart", version = "1.5.4" }

0 commit comments

Comments
 (0)