From 1d23e7ad3baf12a2e320a7d509c925482e2f54ce Mon Sep 17 00:00:00 2001 From: Tommy Ettinger Date: Thu, 12 Sep 2024 18:01:16 -0700 Subject: [PATCH] Release 1.12.1.15 ! --- Troubleshooting.md | 54 ++++++++++++++++--- build.gradle | 8 +-- gradle.properties | 4 +- .../gdx/liftoff/config/Configuration.kt | 2 +- .../gdx/liftoff/data/project/Project.kt | 2 +- .../resources/ui-data/defaults.properties | 2 +- version.txt | 2 +- 7 files changed, 57 insertions(+), 17 deletions(-) diff --git a/Troubleshooting.md b/Troubleshooting.md index 72d363f8..77b9095e 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -3,7 +3,7 @@ This is organized as a list of possible messages or signs there is a problem, followed by any ways that help resolve those problems. -This guide is brand new, and will be added to as new solutions are found for problems. +This guide is a little new, and will be added to as new solutions are found for problems. ### First things first, make sure you're using Java 17 or newer. @@ -299,20 +299,60 @@ more modern than the rather old NFD version we were using. ### The native distributions for macOS won't run how they should! +First off, if you can run a .jar file normally, you should try that before any of the following steps. The runnable .jar +file is always provided with Liftoff releases. The native distribution is meant for cases when you don't have a JDK +installed at the system level (such as if your IDE has its own JDK, and you haven't added one). + This is a bit of a tricky issue, because the native distributions are built (currently) on Windows 11, which doesn't -have the same ways it can mark files as macOS. However, once you have downloaded the macOS M1 or macOS x64 distribution, -you can (on macOS) run these two commands from the same directory as `gdx-liftoff.app` : +have the same ways it can mark files as macOS. Liftoff version 1.12.1.15 and newer does mark the right file as +executable, but still has to deal with how macOS browsers like to put downloaded files in "quarantine." +Once you have downloaded the macOS M1 or macOS x64 distribution, you can (on macOS) run this command from the same +directory as `gdx-liftoff.app` : ``` xattr -cr gdx-liftoff.app -chmod +x gdx-liftoff.app/Contents/MacOS/gdx-liftoff ``` -After running those two commands, the .app should be normally runnable via double-click. +This removes `gdx-liftoff.app` from quarantine. After running that command, the .app should be normally runnable via +double-click. If that doesn't work, you may have an older Liftoff distribution (1.12.1.14 or older), which if you need +to use that version for some reason, needs an extra step after the above one: + +``` +chmod +x gdx-liftoff.app/Contents/MacOS/gdx-liftoff +``` These were found by JojoIce in [this issue thread](https://github.com/libgdx/gdx-liftoff/issues/194#issuecomment-2299071552); more future discoveries could be in that thread or in other issues. As far as I can tell, the first command clears any attributes on the downloaded `.app`, which removes any quarantine settings, and the second command sets the entry point -inside the `.app` to be executable. Since the quarantine settings are applied to the .app when it is downloaded, there +inside the `.app` to be executable. The second command isn't needed anymore thanks to changes in Liftoff 1.12.1.15, +which uses construo 1.4.1 . Since the quarantine settings are applied to the .app when it is downloaded, there isn't really any change that could be made to how Liftoff is built that would make it somehow avoid being quarantined. -If there is something out there, please post an issue and let us know about it! +The only ways I know of that handle quarantine settings are to a) download gdx-liftoff.app via a tool such as curl, or +b) download it however you want and use the above `xattr` command to remove the file from quarantine. Using curl will +simply not apply quarantine to any files it downloads, but I haven't used it in a while (and never on recent macOS), so +the exact command-line syntax is something you'd have to look up. + +### Weird Gradle issues with "Cannot call Task.usesService(Provider)..." + +These have been reported intermittently with Gradle 8.10.1, which Liftoff 1.12.1.15 (and possibly newer) uses, but that +version of Liftoff also includes one of the recommended workarounds for that Gradle version - disabling Gradle's daemon +service. It is entirely likely that the way the daemon is disabled might not work, because Gradle really likes to try to +use the daemon even when it is broken. Disabling the daemon doesn't appear to have much performance impact, especially +since Gradle 8.10.1 is mostly meant to fix a performance regression in Gradle 8.10, and so could be faster either with +or without the daemon. If you are encountering this, you should downgrade Gradle to 8.10: + +- Open the file `gradle/wrapper/gradle-wrapper.properties` in your project. +- Find where it has the version string `8.10.1` ; this is on a line that starts with `distributionUrl` . +- Change `8.10.1` to `8.10` . +- Save and reload your Gradle project. + - If you don't know how to reload your Gradle project, it is done automatically by Android Studio, so you don't need + to do anything but save there. Otherwise, in IDEA: + - Click the sideways `Gradle` tab on the right side of the window. + - Click the two circling arrows ("Reload All Gradle Projects") in the pane that appears. + - This clears out most IDE-specific configuration you may have done via "Project Structure"; that configuration is + meant to be controlled by Gradle, so Gradle changes will take priority. Usually Project Structure changes beyond the + JDK setting aren't needed, and the JDK settings won't be cleared out. + +At some point in the near future, you could upgrade Gradle to 8.10.2 instead, but that hasn't been released yet. When it +does release, the steps will be the same as above, just that you would change to "8.10.2" instead of "8.10" . The +version might also be called "8.11" . Gradle 9.0 is expected to have at least some breaking changes, however. diff --git a/build.gradle b/build.gradle index 075431de..fc18d61e 100644 --- a/build.gradle +++ b/build.gradle @@ -109,11 +109,11 @@ construo { targets.configure { create("linuxX64", Target.Linux) { architecture.set(Target.Architecture.X86_64) - jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz") + jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.12_7.tar.gz") } create("macM1", Target.MacOs) { architecture.set(Target.Architecture.AARCH64) - jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.11_9.tar.gz") + jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.12_7.tar.gz") // macOS needs an identifier identifier.set("com.libgdx.liftoff." + appName) // Optional: icon for macOS @@ -121,7 +121,7 @@ construo { } create("macX64", Target.MacOs) { architecture.set(Target.Architecture.X86_64) - jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_mac_hotspot_17.0.11_9.tar.gz") + jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_mac_hotspot_17.0.12_7.tar.gz") // macOS needs an identifier identifier.set("com.libgdx.liftoff." + appName) // Optional: icon for macOS @@ -129,7 +129,7 @@ construo { } create("winX64", Target.Windows) { architecture.set(Target.Architecture.X86_64) - jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_windows_hotspot_17.0.11_9.zip") + jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_windows_hotspot_17.0.12_7.zip") } } } diff --git a/gradle.properties b/gradle.properties index 54396bc0..1e486176 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ -liftoffVersion=1.12.1.14-SNAPSHOT org.gradle.daemon=false -#org.gradle.jvmargs=-Xms512M -Xmx1G -Dfile.encoding=UTF-8 -Dconsole.encoding=UTF-8 +org.gradle.jvmargs=-Xms512M -Xmx1G -Dfile.encoding=UTF-8 -Dconsole.encoding=UTF-8 +liftoffVersion=1.12.1.15 #kotlinVersion=1.9.25 kotlinVersion=2.0.20 gdxVersion=1.12.1 diff --git a/src/main/kotlin/gdx/liftoff/config/Configuration.kt b/src/main/kotlin/gdx/liftoff/config/Configuration.kt index 317f4036..f8fe64e4 100644 --- a/src/main/kotlin/gdx/liftoff/config/Configuration.kt +++ b/src/main/kotlin/gdx/liftoff/config/Configuration.kt @@ -37,7 +37,7 @@ import gdx.liftoff.views.widgets.ScrollableTextArea @Suppress("unused") // Fields accessed via reflection. class Configuration { companion object { - const val VERSION = "1.12.1.14-SNAPSHOT" + const val VERSION = "1.12.1.15" const val WIDTH = 600 const val HEIGHT = 700 const val PREFERENCES_PATH = "gdx-liftoff-prefs" diff --git a/src/main/kotlin/gdx/liftoff/data/project/Project.kt b/src/main/kotlin/gdx/liftoff/data/project/Project.kt index 81a6e15e..9b57b2fc 100644 --- a/src/main/kotlin/gdx/liftoff/data/project/Project.kt +++ b/src/main/kotlin/gdx/liftoff/data/project/Project.kt @@ -39,7 +39,7 @@ class Project( val rootGradle: RootGradleFile val properties = mutableMapOf( "org.gradle.daemon" to "false", -// "org.gradle.jvmargs" to "-Xms512M -Xmx1G", + "org.gradle.jvmargs" to "-Xms512M -Xmx1G -Dfile.encoding=UTF-8 -Dconsole.encoding=UTF-8", "org.gradle.configureondemand" to "false" ) val gwtInherits = mutableSetOf() diff --git a/src/main/resources/ui-data/defaults.properties b/src/main/resources/ui-data/defaults.properties index 80cffdaa..5f5e78f1 100644 --- a/src/main/resources/ui-data/defaults.properties +++ b/src/main/resources/ui-data/defaults.properties @@ -1,4 +1,4 @@ -liftoffVersion=1.12.1.14-SNAPSHOT +liftoffVersion=1.12.1.15 projectNameDefault=YourProjectName packageNameDefault=io.github.some_example_name mainClassNameDefault=Main diff --git a/version.txt b/version.txt index 6ec9a5c9..e0aab2c8 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.12.1.14 +1.12.1.15