Skip to content

Commit

Permalink
move versions from java-conventions.
Browse files Browse the repository at this point in the history
launch4j task (deprecated) changed to createExe
  • Loading branch information
midttuna committed Dec 3, 2024
1 parent 1c2cda0 commit 8e1caa7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
val defaultVersion = "9.1.0-SNAPSHOT"
val actualVersion = project.findProperty("revision") ?: defaultVersion
val actualRevision = project.findProperty("changelist") ?: ""

group = "com.draeger.medical"
version = "$actualVersion$actualRevision"
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,8 @@ repositories {
}
}


val defaultVersion = "9.1.0-SNAPSHOT"
val actualVersion = project.findProperty("revision") ?: defaultVersion
val actualRevision = project.findProperty("changelist") ?: ""

val javaVersion = property("javaVersion").toString()

group = "com.draeger.medical"
version = "$actualVersion$actualRevision"

java {
sourceCompatibility = JavaVersion.toVersion(javaVersion)
targetCompatibility = JavaVersion.toVersion(javaVersion)
Expand Down
8 changes: 4 additions & 4 deletions sdccc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,14 @@ tasks.register<Copy>("copyRuntimeLibs") {

val projectName = "SDCcc-gradle"

launch4j {
tasks.createExe {
headerType = "console"
jar = "${layout.buildDirectory.get().asFile}/libs/${projectName}-${project.version}.jar"
outfile = "${projectName}-${project.version}.exe" // Absolute path not allowed. File gets placed in build/launch4j
mainClassName = "com.draeger.medical.sdccc.TestSuite"
classpath = mutableSetOf("lib/**")
jreMinVersion = javaVersion
bundledJrePath = "\$\${jreFullPath}"
bundledJrePath = "${layout.buildDirectory.get().asFile}/${jreFullPath}"

version = "${project.version}.0"
textVersion = "${project.version}"
Expand All @@ -175,12 +175,12 @@ launch4j {
internalName = "sdccc"
}

tasks.named("launch4j") {
tasks.named("createExe") {
dependsOn("copyRuntimeLibs", "downloadAndUnpackJre")
}

tasks.named("build") {
dependsOn("launch4j")
dependsOn("createExe")
}

tasks.test {
Expand Down

0 comments on commit 8e1caa7

Please sign in to comment.