mirror of
https://github.com/bitsycore/compose-desktop-native.git
synced 2026-10-05 18:57: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.
35 lines
1.2 KiB
Kotlin
35 lines
1.2 KiB
Kotlin
// :koin:koin-compose - org.koin.compose.*, vendored VERBATIM from InsertKoinIO/koin.
|
|
// Upstream publishes apple + android only; the sources (including the nativeMain
|
|
// KoinApplication actual) are platform-agnostic, so the port rebuilds them for its
|
|
// desktop targets. See koin/koin-core-viewmodel/build.gradle.kts for the coordinate
|
|
// policy; provenance = compose-fork.txt.
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.kotlin.plugin.compose)
|
|
}
|
|
|
|
val vHostSupportsMingw = rootProject.extra["vHostSupportsMingw"] as Boolean
|
|
|
|
kotlin {
|
|
linuxArm64(); linuxX64(); macosArm64(); if (vHostSupportsMingw) mingwX64()
|
|
applyDefaultHierarchyTemplate()
|
|
sourceSets {
|
|
commonMain {
|
|
dependencies {
|
|
api(libs.koin.core)
|
|
api("org.jetbrains.compose.runtime:runtime:${libs.versions.composeRuntime.get()}")
|
|
// Substituted to project(":compose:foundation:foundation") on every
|
|
// native configuration by the root build's commonization bridge.
|
|
api("org.jetbrains.compose.foundation:foundation:${libs.versions.compose.get()}")
|
|
}
|
|
kotlin.srcDir("src/vendor/common/kotlin")
|
|
}
|
|
nativeMain {
|
|
kotlin.srcDir("src/vendor/native/kotlin")
|
|
}
|
|
}
|
|
compilerOptions {
|
|
freeCompilerArgs.add("-Xexpect-actual-classes")
|
|
}
|
|
}
|