Bump Sparkle to 2.9.1 and fix mac build JDK selection#132
Bump Sparkle to 2.9.1 and fix mac build JDK selection#132
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c682895b25
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| runOnlyForDeploymentPostprocessing = 0; | ||
| shellPath = /bin/sh; | ||
| shellScript = "set -e\n\nCOMPOSE_DIR=\"${PROJECT_DIR}/../snapo-desktop-compose\"\n\nif [ ! -d \"${COMPOSE_DIR}\" ]; then\n echo \"error: snapo-desktop-compose not found at ${COMPOSE_DIR}\" >&2\n exit 1\nfi\n\nJAVA_HOME_17=\"$(/usr/libexec/java_home -v 17 2>/dev/null || true)\"\nif [ -z \"${JAVA_HOME_17}\" ]; then\n echo \"error: JDK 17 not found. Install Temurin 17 (or set JAVA_HOME) to build snapo-desktop-compose.\" >&2\n exit 1\nfi\n\nexport JAVA_HOME=\"${JAVA_HOME_17}\"\nexport PATH=\"${JAVA_HOME}/bin:${PATH}\"\n\nTASK=\"createDistributable\"\nif [ \"${CONFIGURATION}\" = \"Release\" ]; then\n TASK=\"createReleaseDistributable\"\nfi\n\n( cd \"${COMPOSE_DIR}\" && ./gradlew \"${TASK}\" )\n"; | ||
| shellScript = "set -e\n\nCOMPOSE_DIR=\"${PROJECT_DIR}/../snapo-desktop-compose\"\n\nif [ ! -d \"${COMPOSE_DIR}\" ]; then\n echo \"error: snapo-desktop-compose not found at ${COMPOSE_DIR}\" >&2\n exit 1\nfi\n\nJAVA_HOME_17=\"${JAVA_HOME:-}\"\nif [ -n \"${JAVA_HOME_17}\" ] && [ -x \"${JAVA_HOME_17}/bin/java\" ]; then\n case \"$(\"${JAVA_HOME_17}/bin/java\" -version 2>&1 | /usr/bin/head -n 1)\" in\n *\\\"17.*\\\"*) ;;\n *) JAVA_HOME_17=\"\" ;;\n esac\nfi\nTEMURIN_17_HOME=\"/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home\"\nif [ -z \"${JAVA_HOME_17}\" ] && [ -x \"${TEMURIN_17_HOME}/bin/java\" ]; then\n JAVA_HOME_17=\"${TEMURIN_17_HOME}\"\nfi\nif [ -z \"${JAVA_HOME_17}\" ]; then\n JAVA_HOME_17=\"$(/usr/libexec/java_home -v 17 2>/dev/null || true)\"\nfi\nif [ -z \"${JAVA_HOME_17}\" ]; then\n echo \"error: JDK 17 not found. Install Temurin 17 (or set JAVA_HOME) to build snapo-desktop-compose.\" >&2\n exit 1\nfi\n\nexport JAVA_HOME=\"${JAVA_HOME_17}\"\nexport PATH=\"${JAVA_HOME}/bin:${PATH}\"\n\nTASK=\"createDistributable\"\nif [ \"${CONFIGURATION}\" = \"Release\" ]; then\n TASK=\"createReleaseDistributable\"\nfi\n\n( cd \"${COMPOSE_DIR}\" && ./gradlew \"${TASK}\" )\n"; |
There was a problem hiding this comment.
Reset invalid JAVA_HOME before JDK fallback
The build script only clears JAVA_HOME_17 when ${JAVA_HOME}/bin/java exists and is not Java 17. If JAVA_HOME is set but points to a stale/nonexistent path, JAVA_HOME_17 remains non-empty, so Temurin and java_home -v 17 fallbacks are skipped. The script then exports an invalid JAVA_HOME, causing Gradle packaging to fail.
Useful? React with 👍 / 👎.
Summary
2.7.1to2.9.1@MainActorto match Sparkle’s newer concurrency annotationsJAVA_HOMEis set to a non-17 JDKTesting
xcodebuild -project Snap-O.xcodeproj -scheme Snap-O CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO buildcompletes successfully