mirror of
https://github.com/bitsycore/compose-desktop-native.git
synced 2026-10-07 03:37:26 +00:00
koin-core 4.2.2 already publishes mingwX64 + linux klibs, so it stays a plain Maven dependency. These four do not, and their sources are platform-agnostic, so the port rebuilds the same code for its desktop targets: :koin:koin-core-viewmodel org.koin.viewmodel.* + module DSL :koin:koin-compose org.koin.compose.* :koin:koin-compose-viewmodel org.koin.compose.viewmodel.* :koin:koin-compose-navigation3 org.koin.compose.navigation3.* Vendored VERBATIM from InsertKoinIO/koin @ 4.2.2 (new KOIN_REF pin + manifests); 36 files, no local edits needed - everything compiled for mingwX64 unmodified. NAV3, NOT NAV2: the requested koin-compose-viewmodel-navigation sits on nav2's navigation-compose, which publishes no mingwX64/linux klibs under EITHER the androidx.* or org.jetbrains.androidx.* coordinates - it cannot reach this port's targets without vendoring nav2 too. This port's navigation story is Navigation 3 (:navigation3:navigation3-ui), and koin-compose-navigation3 needs only koin-compose + navigation3-runtime, both already reachable. Vendored that instead. GOOGLE lifecycle coordinates (androidx.lifecycle:*), not the org.jetbrains.androidx.* mirrors upstream koin uses: the port already resolves the google ones, and mixing both puts the same classes on the path twice. Published as com.bitsycore.koin:<module>; bridge substitution rules added so consumers keep declaring the official io.insert-koin coordinates.
39 lines
1.4 KiB
Kotlin
39 lines
1.4 KiB
Kotlin
// :koin:koin-core-viewmodel - org.koin.viewmodel.* / org.koin.core.module.dsl.*,
|
|
// vendored VERBATIM from InsertKoinIO/koin into src/vendor.
|
|
//
|
|
// Upstream publishes this module for apple + android only, so there is no
|
|
// mingwX64 / linux klib on Maven; the sources are platform-agnostic, so the port
|
|
// simply rebuilds them for its desktop targets.
|
|
//
|
|
// koin-core itself DOES publish mingwX64 + linux and is consumed from Maven as-is.
|
|
// The lifecycle/viewmodel deps use the GOOGLE coordinates (androidx.lifecycle:*),
|
|
// matching the rest of the port - upstream koin uses the org.jetbrains.androidx.*
|
|
// mirrors, and mixing the two would put the same classes on the path twice.
|
|
//
|
|
// Provenance = compose-fork.txt + scripts/compose-fork/compose.properties. Never
|
|
// hand-edit src/vendor - change the manifest + re-run
|
|
// `python scripts/compose-fork/sync.py koin/koin-core-viewmodel`.
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
}
|
|
|
|
val vHostSupportsMingw = rootProject.extra["vHostSupportsMingw"] as Boolean
|
|
|
|
kotlin {
|
|
linuxArm64(); linuxX64(); macosArm64(); if (vHostSupportsMingw) mingwX64()
|
|
applyDefaultHierarchyTemplate()
|
|
sourceSets {
|
|
commonMain {
|
|
dependencies {
|
|
api(libs.koin.core)
|
|
api(libs.androidx.lifecycle.viewmodel)
|
|
api(libs.androidx.lifecycle.viewmodel.savedstate)
|
|
}
|
|
kotlin.srcDir("src/vendor/common/kotlin")
|
|
}
|
|
}
|
|
compilerOptions {
|
|
freeCompilerArgs.add("-Xexpect-actual-classes")
|
|
}
|
|
}
|