diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a1975558..6abb0b401 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,12 +21,12 @@ jobs: name: Build and Verify steps: - name: Checkout - uses: actions/checkout@v4.1.0 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: JDK Setup - uses: actions/setup-java@v3.13.0 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 21 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8b82d9527..9d1106b68 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,12 +78,12 @@ jobs: os: [ ubuntu-latest, macos-latest, windows-latest ] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 21 @@ -95,10 +95,11 @@ jobs: run: ./gradlew jpackage -Prelease=true - name: Upload package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: utiLITI-${{ runner.os }} - path: build/litiengine-utiliti/jpackage + path: utiliti/build/jpackage + # TODO consider uploading the artifacts to itch.io automatically with butler, /~https://github.com/jdno/setup-butler create_release: name: Create GitHub release diff --git a/utiliti/build.gradle b/utiliti/build.gradle index fcfb46c12..3229e2173 100644 --- a/utiliti/build.gradle +++ b/utiliti/build.gradle @@ -34,7 +34,7 @@ dependencies { } runtime { - options.set(["--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages"]) + options.set(["--strip-debug", "--no-header-files", "--no-man-pages"]) modules.set(["java.desktop", "java.logging", "java.datatransfer", "java.management", "java.xml"]) launcher { @@ -48,7 +48,6 @@ runtime { var iconFileType = currentOs.isWindows() ? "ico" : currentOs.isMacOsX() ? "icns" : "png" imageOptions.addAll([ - "--app-version", appVersion, "--icon", "${project.file("src/dist/pixel-icon-utiliti.$iconFileType").path}", "--description", description, "--copyright", copyright, @@ -59,6 +58,10 @@ runtime { ] as Collection) if (currentOs.isMacOsX()) { +// TODO: Once we are above version 1.0.0, we should be able to use the project version directly for Mac builds. + def tmpAppVersion = project.version.toString().tokenize("-")[0].tokenize(".") + tmpAppVersion[0] = "1337" + appVersion = tmpAppVersion.join('.') imageOptions.addAll( ["--mac-package-identifier", "de.gurkenlabs.litiengine.utiliti", "--mac-package-name", applicationName // Name appearing in Menu Bar. @@ -68,18 +71,15 @@ runtime { } } -tasks.register("createLicenseProperties") { +tasks.register("createLicenseProperties", WriteProperties) { dependsOn processResources - doLast { - new File("$buildDir/resources/main/licensing.properties").withWriter { w -> - Properties p = new Properties() - p['copyright'] = copyright.toString() - p['website'] = gurkenlabs_url - p['version'] = version.toString() - p.store w, null - } - } + destinationFile = file("${layout.buildDirectory.get()}/resources/main/licensing.properties") + encoding = "UTF-8" + property('copyright', copyright.toString()) + property('website', gurkenlabs_url) + property('version', version.toString()) } + classes { dependsOn createLicenseProperties }