mirror of
https://github.com/bitsycore/compose-desktop-native.git
synced 2026-10-05 10:47:26 +00:00
Upstream baseline - Pin both vendored refs to the STABLE v1.12.0 tag (core + umbrella); the native and JVM-parity legs are back in lockstep, no dev-build skew. - Catalog: compose 1.12.0, composeRuntime 1.12.0. material3 stays 1.12.0-alpha03 - that IS the version CMP 1.12.0 ships (its own train). - Re-synced 1560 vendored files; drift + vendor-clean both clean. - Retire the SelectionLayout.kt manual vendor: upstream fixed the same out-of-bounds at the source (lastSlot = currentSlot, not currentSlot + 1), so the fork's index clamps are redundant. Back to verbatim vendoring. - Re-stamp 10 manual vendors to @ v1.12.0 (upstream unchanged base..pin). - Regenerate the klib API dumps. These had already drifted on main (the last dump predates the scrollbar / IME changes), so the diff covers that too. SDL3 3.4.16, skiko fork 0.150.1-mingw.2 - Rebuild the static libSDL3.a from release-3.4.16. - CMP 1.12.0 uses skiko 0.150.1, unchanged, so the fork's Skia base still matches; bump to the -mingw.2 build and centralise it as `skikoMingw` in the version catalog instead of three hardcoded copies. - Resolve the fork from the PUBLIC maven.bitsycore.com/releases instead of the credentialed GitHub Packages repo: building the Windows target no longer needs a GitHub token. Gradle module paths mirror the directory - Drop every projectDir redirect: :ui -> :compose:ui:ui, :animation-core -> :compose:animation:animation-core, and so on. - INVARIANT (documented in settings.gradle.kts + CLAUDE.md): the leaf directory IS the published artifactId. KMP derives a target publication's coordinate as <project.name>-<target>, and a target disabled on the building host (all Apple targets on Windows) has no publication object to retarget - while the root kotlinMultiplatform metadata, which the WINDOWS publish job owns, still emits an available-at for it. A mismatched leaf silently ships a root module pointing at a nonexistent <leaf>-macosarm64. So compose/desktop/native/window and components/resources/library are renamed to their artifactIds. Published coordinates are unchanged. Manual-vendor audit - New scripts/compose-fork/audit-exclusions.py: classifies every `!` manifest exclusion as manual vendor (VENDOR-BASE, drift-tracked), reimplementation (VENDOR-REIMPL, deliberately not tracked), or orphan, and fails on any unclassified one. - 14 project reimplementations were invisible to the drift checker by accident; mark them VENDOR-REIMPL. None needed reconciling (all verified <= 0.53 similarity to their upstream counterparts, none changed upstream between the old pin and v1.12.0). Fix the JVM apidemo build - Declare components-resources on jvmMain (decodeToImageBitmap / decodeToSvgPainter) and add the two missing cross-package imports. The JVM parity target had never compiled. Verified on Windows: both native executables link and render, apidemo JVM builds and launches, apiCheck green, common metadata compiles (the Windows publish gate), publishToMavenLocal emits the same coordinates as before.
57 lines
2.3 KiB
Kotlin
57 lines
2.3 KiB
Kotlin
// :desktop-native-window - the module apps depend on. Owns nativeComposeWindow() (main loop,
|
|
// recomposer lifecycle, event dispatch, Snapshot apply notifications).
|
|
// Renderer selection happens entirely inside :ui via source-set wiring
|
|
// (skikoRendererMain - Skia-only) - this module just calls
|
|
// `createRenderBackend(...)` and `rendererPreferredGpuMode()` from :ui and
|
|
// the right symbol resolves per target.
|
|
// Publication artifactId (when set up): compose-desktop-native.
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.kotlin.plugin.compose)
|
|
alias(libs.plugins.compose.multiplatform)
|
|
}
|
|
|
|
// Skip mingwX64 on non-Windows hosts; see root build.gradle.kts.
|
|
val vHostSupportsMingw = rootProject.extra["vHostSupportsMingw"] as Boolean
|
|
|
|
kotlin {
|
|
linuxArm64()
|
|
linuxX64()
|
|
macosArm64()
|
|
if (vHostSupportsMingw) mingwX64()
|
|
|
|
applyDefaultHierarchyTemplate()
|
|
|
|
// sdl3.* types are api-exposed via :ui → :sdl-core's cinterop klib - no
|
|
// separate sdl3 cinterop here.
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
// api so apps depending on :desktop-native-window also get the compose re-impl,
|
|
// Res/resources, GpuMode, and the renderer pipeline from :ui, plus
|
|
// the foundation / animation-core / animation modules that were split
|
|
// out of :ui (upstream Compose layout).
|
|
// Material widgets used to be re-exported from :material here; the
|
|
// module was retired when :apidemo and :demo migrated to :material3.
|
|
// Apps that want Material 3 widgets pull `implementation(project(":compose:material3:material3"))`
|
|
// themselves (:material3 doesn't need to be `api`-exposed - the
|
|
// upstream vendored surface is stable and apps import it directly).
|
|
api(project(":compose:ui:ui"))
|
|
api(project(":compose:foundation:foundation"))
|
|
api(project(":compose:animation:animation-core"))
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
// setMain() / resetMain() - see Sdl3MainDispatcher.kt for usage.
|
|
implementation(libs.kotlinx.coroutines.test)
|
|
}
|
|
}
|
|
|
|
compilerOptions {
|
|
freeCompilerArgs.addAll(
|
|
"-Xcollection-literals",
|
|
"-Xexpect-actual-classes",
|
|
"-opt-in=kotlinx.cinterop.ExperimentalForeignApi"
|
|
)
|
|
}
|
|
}
|