Skip to content

Adopt sk.ainet.multiplatform + sk.ainet.npm-pins from SKaiNET-build-logic - #5

Merged
michalharakal merged 1 commit into
developfrom
feat/adopt-skainet-build-logic
Sep 12, 2026
Merged

michalharakal merged 1 commit into
developfrom
feat/adopt-skainet-build-logic

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Summary

  • Replaces every module's hand-rolled plugins{}/kotlin{ android{...}; jvm(); ...; js{browser()}/wasmJs{browser()} } boilerplate (copy-pasted 6 times) with id("sk.ainet.multiplatform") + a per-module skainet { namespace = ... } block, consuming the real Maven Central release of SKaiNET-build-logic 1.0.0.
  • Supersedes Add linuxX64 target to all six modules #3 (the earlier manual linuxX64 fix): the linux target group expands to linuxX64+linuxArm64 together, so this exact class of bug is now structurally impossible instead of caught after the fact. Closing Add linuxX64 target to all six modules #3 once this merges.
  • sk.ainet.npm-pins applied for real at root (every module here builds js/wasmJs, and sk.ainet.multiplatform requires it in force at the root) -- no pins declared yet, just puts the mechanism in place.
  • kotlin-test in commonTest is now automatic (a sk.ainet.multiplatform default), so the explicit implementation(libs.kotlin.test) line every module had is gone.
  • Net effect: -83 lines of boilerplate across the 6 modules, and any future target-list drift (like the linuxX64 bug) becomes impossible by construction rather than something to notice and fix per-module.

Test plan

  • Full multi-project configuration green (./gradlew tasks)
  • ./gradlew publishToMavenLocal green -- 728 tasks, all 6 modules x every target (jvm/android/androidNative/ios/macos/linux/js/wasmJs)
  • The repo's own validate-published-poms.sh gate passes clean on all 70 published POMs -- group/version resolution for internal project() dependencies (audio-melaudio-core, audio-sourceaudio-wav) unchanged
  • jvmTest + linuxX64Test green across all modules

🤖 Generated with Claude Code

…ogic

Replaces every module's hand-rolled plugins{}/kotlin{ android{...};
jvm(); androidNativeArm32(); ...; js{browser()}/wasmJs{browser()} }
boilerplate (copy-pasted 6 times, one line different per module) with
id("sk.ainet.multiplatform") + a per-module skainet { namespace = ... }
block and a gradle.properties skainet.targets declaration (must be a
Gradle property, not part of the skainet{} DSL -- Kotlin targets have to
exist before the module's own kotlin{} block runs, see SkainetTargets'
own doc comment).

Supersedes #3 (the earlier manual linuxX64 fix): the "linux" target
group expands to linuxX64+linuxArm64 together, so this exact class of
bug -- one target silently missing from a hand-copied list -- is now
structurally impossible instead of caught after the fact.

sk.ainet.npm-pins applied at root (real application, not apply false):
every module here builds js and/or wasmJs targets, and
sk.ainet.multiplatform refuses to configure a web target unless it's in
force at the root. No pins declared yet (nothing to pin currently) --
this just puts the mechanism in place for when one's needed.

Both plugin versions pinned once via pluginManagement.plugins{} in
settings.gradle.kts rather than at each application site: they share an
implementation jar, and Gradle can't cleanly resolve more than one
plugin ID from the same jar with an explicit version at each individual
site ("plugin is already on the classpath with an unknown version").

kotlin-test in commonTest is now automatic (skainet {
kotlinTestInCommonTest } defaults true) -- the explicit
implementation(libs.kotlin.test) lines every module had are gone,
nothing else changed about test dependencies.

Verified: full multi-project configuration green; ./gradlew
publishToMavenLocal (728 tasks, all 6 modules x every target) green;
the repo's own validate-published-poms.sh gate passes clean on all 70
published POMs (group/version resolution for internal project()
dependencies unchanged); jvmTest + linuxX64Test green.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@michalharakal
michalharakal merged commit bf6391b into develop Sep 12, 2026
1 check passed
@michalharakal
michalharakal deleted the feat/adopt-skainet-build-logic branch September 12, 2026 13:55
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.

1 participant