From 8e1caa781ab68b30f58bf3af8f203014588501f9 Mon Sep 17 00:00:00 2001 From: midttuna Date: Tue, 3 Dec 2024 09:29:37 +0200 Subject: [PATCH] move versions from java-conventions. launch4j task (deprecated) changed to createExe --- build.gradle.kts | 6 ++++++ .../com.draeger.medical.java-conventions.gradle.kts | 8 -------- sdccc/build.gradle.kts | 8 ++++---- 3 files changed, 10 insertions(+), 12 deletions(-) create mode 100644 build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000..9ea026f3 --- /dev/null +++ b/build.gradle.kts @@ -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" \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/com.draeger.medical.java-conventions.gradle.kts b/buildSrc/src/main/kotlin/com.draeger.medical.java-conventions.gradle.kts index bdab5887..8cc45651 100644 --- a/buildSrc/src/main/kotlin/com.draeger.medical.java-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/com.draeger.medical.java-conventions.gradle.kts @@ -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) diff --git a/sdccc/build.gradle.kts b/sdccc/build.gradle.kts index ac91ae0f..e2c91abc 100644 --- a/sdccc/build.gradle.kts +++ b/sdccc/build.gradle.kts @@ -156,14 +156,14 @@ tasks.register("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}" @@ -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 {