the new and simple way of packaging windows

This commit is contained in:
Aria Moradi
2021-05-18 21:31:25 +04:30
parent cacc97cec7
commit c1baa31eed
8 changed files with 29 additions and 20 deletions
+16 -16
View File
@@ -126,18 +126,8 @@ buildConfig {
buildConfigField("boolean", "debug", project.hasProperty("debugApp").toString())
}
launch4j { //used for windows
mainClassName = MainClass
bundledJrePath = "jre"
bundledJre64Bit = true
jreMinVersion = "8"
outputDir = "${rootProject.name}-$tachideskVersion-$tachideskRevision-win64"
icon = "${projectDir}/src/main/resources/icon/faviconlogo.ico"
jar = "${projectDir}/build/${rootProject.name}-$tachideskVersion-$tachideskRevision.jar"
}
tasks {
jar {
shadowJar {
manifest {
attributes(
mapOf(
@@ -149,9 +139,6 @@ tasks {
)
)
}
}
shadowJar {
manifest.inheritFrom(jar.get().manifest) //will make your shadowJar (produced by jar task) runnable
archiveBaseName.set(rootProject.name)
archiveVersion.set(tachideskVersion)
archiveClassifier.set(tachideskRevision)
@@ -168,8 +155,8 @@ tasks {
test {
useJUnit()
}
withType<ShadowJar> {
destinationDirectory.set(File("$rootDir/server/build"))
dependsOn("formatKotlin", "lintKotlin")
@@ -193,3 +180,16 @@ tasks {
}
}
launch4j { //used for windows
mainClassName = MainClass
bundledJrePath = "jre"
bundledJre64Bit = true
dontWrapJar = true
outputDir = "${rootProject.name}-$tachideskVersion-$tachideskRevision-win64"
icon = "${projectDir}/src/main/resources/icon/faviconlogo.ico"
jar = "Tachidesk.jar"
libraryDir = ""
copyConfigurable = "false"
}