Fix Kotlin release; stop publishing moq-clock + @moq/clock#1488
Conversation
…nabled=true
`apply(from = "android.gradle.kts")` script plugins don't inherit the
parent's plugin classpath at compile time, so the apply-from script
couldn't resolve `kotlin {}`, `androidTarget`, `JvmTarget`, or
`com.android.build.gradle.LibraryExtension`. Every `moq-ffi-v*` tag has
been failing the Kotlin release with 35 unresolved references since the
file was introduced in #1432.
Fold the Android-specific source-set wiring and `LibraryExtension`
config back into the module's `build.gradle.kts`, guarded by
`if (androidEnabled)`. Declare AGP `apply false` in the plugins block so
its types are on the (single) script classpath; the actual `apply` only
runs when `-Pandroid.enabled=true`. The plugin marker now resolves
against google() at sync even for JVM-only builds — comments updated to
reflect that.
Also widen the release-kt.yml PR trigger from `kt/scripts/package.sh` to
`kt/**` so future Kotlin build edits get exercised by the dry-run.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
WalkthroughThis PR refactors Android build configuration in the Kotlin Multiplatform moq module and clarifies the Android opt-in model across documentation and configuration. The changes consolidate Android-specific Gradle setup from a separate android.gradle.kts file into moq/build.gradle.kts while maintaining the gate behind the 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Both are example binaries — useful as a moq-net reference and for sanity-checking relays, not something anyone should be `cargo install`ing or `npm install`ing. - rs/moq-clock/Cargo.toml: `publish = false` so cargo refuses to push. - .release-plz.toml: per-package `release = false` so release-plz stops bumping the version, tagging, and invoking cargo publish. - Delete .github/workflows/moq-clock.yml (the per-tag binary release). - Delete .github/homebrew/Formula/moq-clock.rb.tmpl and remove moq-clock from release-brew.yml's workflow_run triggers + README seed. - js/clock/package.json: `private: true` so npm refuses to publish even if a `release` script gets added later. - rs/moq-clock/README.md: drop the `cargo install` instructions and the crates.io/docs.rs badges; point users at `cargo run -p moq-clock`. The crate stays in the workspace and builds with everything else; only the publish/release plumbing is severed. Existing artifacts (the moq-clock-v* GitHub Releases, crates.io versions, and the moq-clock.rb in moq-dev/homebrew-tap) are left in place — they're immutable / out of scope for this change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two related release-pipeline cleanups. The first half came out of the post-release publishing audit; the second half is the user-requested followup.
Kotlin release: inline
android.gradle.ktsapply(from = "android.gradle.kts")script plugins don't inherit the parent's plugin classpath at compile time, so the apply-from script never resolvedkotlin {},JvmTarget,androidTarget, orcom.android.build.gradle.LibraryExtension. Everymoq-ffi-v*tag has been failing Release Kotlin with 35 unresolved references since #1432 introduced the file.LibraryExtensionconfig back intokt/moq/build.gradle.kts, guarded byif (androidEnabled).apply falsein the plugins block so its types land on the (single) script classpath;apply()only fires under-Pandroid.enabled=true.google()at sync time even for JVM-only builds — comments inkt/moq/build.gradle.kts,kt/settings.gradle.kts,kt/gradle.properties, andkt/README.mdupdated to reflect that.release-kt.ymlPR trigger fromkt/scripts/package.shtokt/**so future Kotlin build edits get exercised by the dry-run.Stop publishing moq-clock and @moq/clock
Both are example binaries — useful as a moq-net reference and for sanity-checking relays, not something anyone should be
cargo installing ornpm installing.rs/moq-clock/Cargo.toml:publish = falseso cargo refuses to push..release-plz.toml: per-packagerelease = falseso release-plz stops bumping the version, tagging, and invoking cargo publish..github/workflows/moq-clock.yml(the per-tag binary release)..github/homebrew/Formula/moq-clock.rb.tmpland remove moq-clock fromrelease-brew.yml'sworkflow_runtriggers + README seed.js/clock/package.json:private: trueso npm refuses to publish even if areleasescript gets added later.rs/moq-clock/README.md: drop thecargo installinstructions and crates.io/docs.rs badges; point users atcargo run -p moq-clock.The crate stays in the workspace and builds with everything else; only the publish/release plumbing is severed. Existing artifacts (the
moq-clock-v*GitHub Releases, crates.io versions, andmoq-clock.rbin moq-dev/homebrew-tap) are left in place — they're immutable or out of scope for this change.Test plan
:moq:publishToMavenLocalwithout unresolved references.release-brew.ymldry-run still renders the remaining four templates cleanly.moq-ffi-v*tag actually publishesdev.moq:moqto Maven Central.moq-clock.🤖 Generated with Claude Code