Skip to content

Gate iOS targets on macOS for JitPack/Linux compatibility#2

Merged
theshid merged 1 commit into
mainfrom
jitpack-iOS-gating
May 1, 2026
Merged

Gate iOS targets on macOS for JitPack/Linux compatibility#2
theshid merged 1 commit into
mainfrom
jitpack-iOS-gating

Conversation

@theshid
Copy link
Copy Markdown
Owner

@theshid theshid commented May 1, 2026

Summary

JitPack builds run on Linux. iOS Kotlin/Native compilation needs a macOS host (Apple toolchain ships only on macOS), so without this gate the JitPack build of 0.2.0 fails on compileKotlinIosArm64 and JitPack publishes nothing — downstream Android consumers can't pull io.github.theshid:prettylog:0.2.0 from the JitPack channel.

  • Wrap iosX64() / iosArm64() / iosSimulatorArm64() target declarations and their source-set wiring in a single OperatingSystem.current().isMacOsX check.
  • Local macOS dev keeps producing all five variants (prettylog-android, -jvm, -iosx64, -iosarm64, -iossimulatorarm64) — verified with ./gradlew :prettylog:assemble.
  • JitPack/Linux publishes Android AAR + JVM JAR + KMP root metadata only. iOS distribution stays available via local Maven publication and can later move to Maven Central or a macOS GitHub Actions runner if iOS uptake warrants.
  • jitpack.yml: pin the install task to ./gradlew :prettylog:publishToMavenLocal explicitly — KMP needs the multi-publication path, not JitPack's default single-AAR install.

Test plan

  • Local macOS: ./gradlew :prettylog:assemble produces all five target outputs
  • Local macOS: ./gradlew :prettylog:publishToMavenLocal publishes the full KMP shape
  • After merge + tag 0.2.0, JitPack build completes and https://jitpack.io/com/github/theshid/Pretty-Log/0.2.0/build.log is green
  • Pull com.github.theshid:Pretty-Log:0.2.0 from JitPack into a downstream Android consumer; verify Logcat output unchanged

🤖 Generated with Claude Code

JitPack builds run on Linux; iOS Kotlin/Native compilation needs a macOS
host. Without this gate, JitPack fails the version build and publishes
nothing — Android consumers can't pull 0.2.0 via the JitPack channel.

Wraps the iosX64/iosArm64/iosSimulatorArm64 target declarations and
their source-set wiring in a single OperatingSystem.current().isMacOsX
check. Local macOS dev keeps building all five variants
(prettylog-android, -jvm, -iosx64, -iosarm64, -iossimulatorarm64);
JitPack publishes the Android AAR and JVM JAR only.

Also pins the JitPack install task so it runs publishToMavenLocal
explicitly — KMP needs the multi-publication path, not the default
single-AAR install task.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@theshid theshid merged commit f86e8da into main May 1, 2026
@theshid theshid deleted the jitpack-iOS-gating branch May 1, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants