Publish releases from macOS so iOS targets resolve - #52
Open
kdroidFilter wants to merge 1 commit into
Open
Conversation
The Maven Central job ran on ubuntu-latest, where iosArm64 and iosSimulatorArm64 are disabled. Kotlin still writes their variants into the root module metadata, but with Gradle's default project coordinates, so 1.0.0 shipped pointing at composewebview:webview-compose-iosarm64:unspecified and no iOS consumer could resolve it. Move the publish job to macos-15 (with the same Xcode selection as the iOS CI jobs) and add :webview-compose:verifyPublicationCoordinates, which fails every publish task when an available-at entry in the root module metadata falls outside the group and version being published. Fixes #51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
dev.nucleusframework:composewebview:1.0.0cannot be resolved by any KMP project with Apple targets (#51):The
publishjob ran onubuntu-latest, whereiosArm64/iosSimulatorArm64are disabled. Kotlin still emits their variants in the root Gradle module metadata, but with Gradle's default project coordinates instead of the publication's. The shippedcomposewebview-1.0.0.moduletherefore contains:while every other target correctly points at
dev.nucleusframework:composewebview-*:1.0.0. The iOS klibs were never published at all.Fix
publishnow runs onmacos-15, reusing the Xcode selection from the iOS jobs inpr-build-check.yml. Natives keep coming from thebuild-nativesmatrix artifacts, so nothing else about the job changes.:webview-compose:verifyPublicationCoordinatesreads the generated rootmodule.jsonand fails if anyavailable-atentry falls outside the group/version being published. It is wired as a dependency of everyAbstractPublishToMaventask, so a wrong publish host can never ship a dangling module again.Verification
1. Guard rejects the broken release — fed the real
composewebview-1.0.0.modulefrom Maven Central:and passes on a macOS publish:
Publication coordinates OK: 20 variants under dev.nucleusframework:*:0.1.0-SNAPSHOT.2. Consumer project, issue reproduced then fixed. A scratch KMP module with
iosArm64+iosSimulatorArm64callingrememberWebViewState/WebViewfromcommonMain::shared:compileKotlinIosArm64composewebview:1.0.0(Maven Central)Could not find composewebview:webview-compose-iosarm64:unspecifiedcomposewebview:1.0.1-e2e(published from macOS)With the fixed publication,
:shared:dependencies --configuration iosArm64CInterop— the exact configuration from the issue — resolves todev.nucleusframework:composewebview-iosarm64:1.0.1-e2e, and:shared:linkDebugFrameworkIosSimulatorArm64linksshared.frameworksuccessfully.3. No regression —
./gradlew :e2e-desktop:runon macOS:SUITE_FINISHED passed=true(full visual suite, real WKWebView).Closes #51