[versions] # 构建与 SDK 版本 agp = "9.3.1" android-compileSdk = "37" android-minSdk = "26" android-targetSdk = "37" kotlin = "2.4.0" ksp = "2.3.10" # KMP & Compose Multiplatform 专属 composeMultiplatform = "1.11.1" kotlinxCoroutines = "1.11.0" material3 = "1.9.0" materialKolor = "5.0.0" compose-adaptive = "1.2.0" # KMP 跨平台核心组件 lifecycle = "2.11.0" compose-multiplatform-lifecycle = "2.11.0" multiplatform-nav3-ui = "1.1.1" room3 = "3.0.1" sqlite = "2.7.0" datastore = "1.2.1" # Android 平台专属依赖 coreKtx = "1.19.0" appcompat = "1.8.0" activityCompose = "1.13.0" work-runtime = "2.11.2" # 网络与持久化/序列化 ktor = "3.5.2" wire = "6.4.5" kotlinSerialization = "1.11.0" okio = "3.18.1" kotlinxDateTime = "0.8.0" # 依赖注入 (DI) & 工具库 koin = "4.2.2" koin-plugin = "1.1.0" coil = "3.5.0" aboutLibraries = "15.0.4" kgit = "1.0.2" # 测试框架 junit = "4.13.2" junitVersion = "1.3.0" espressoCore = "3.7.0" [libraries] # Compose Multiplatform 跨平台核心 UI 库 compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "composeMultiplatform" } compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "composeMultiplatform" } compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "material3" } compose-material3-adaptive = { module = "org.jetbrains.compose.material3.adaptive:adaptive", version.ref = "compose-adaptive" } compose-material3-adaptive-navigation-suite = { module = "org.jetbrains.compose.material3:material3-adaptive-navigation-suite", version.ref = "material3" } compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "composeMultiplatform" } compose-ui-tooling = { module = "org.jetbrains.compose.ui:ui-tooling", version.ref = "composeMultiplatform" } compose-ui-tooling-preview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "composeMultiplatform" } compose-animation = { module = "org.jetbrains.compose.animation:animation", version.ref = "composeMultiplatform" } compose-components-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "composeMultiplatform" } # Dynamic Color 动态主题 material-kolor = { module = "com.materialkolor:material-kolor", version.ref = "materialKolor" } # Kotlin & 通用测试 kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" } kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "kotlinxCoroutines" } # Android 平台专属基础库 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" } androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" } # KMP Lifecycle (JetBrains Compose Multiplatform 移植版) androidx-lifecycle-viewmodel-compose = { group = "org.jetbrains.androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "compose-multiplatform-lifecycle" } androidx-lifecycle-runtime-compose = { group = "org.jetbrains.androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "compose-multiplatform-lifecycle" } # Navigation 3 多平台核心 UI 库 (JetBrains 移植) androidx-navigation3-ui = { module = "org.jetbrains.androidx.navigation3:navigation3-ui", version.ref = "multiplatform-nav3-ui" } # Navigation 3 ViewModel 扩展 (JetBrains 移植) androidx-lifecycle-viewmodel-navigation3 = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-navigation3", version.ref = "compose-multiplatform-lifecycle" } # Jetpack DataStore & Room 3.0 / SQLite 驱动 androidx-datastore-core = { module = "androidx.datastore:datastore-core", version.ref = "datastore" } androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastore" } androidx-room3-runtime = { module = "androidx.room3:room3-runtime", version.ref = "room3" } androidx-room3-compiler = { module = "androidx.room3:room3-compiler", version.ref = "room3" } androidx-sqlite-bundled = { module = "androidx.sqlite:sqlite-bundled", version.ref = "sqlite" } androidx-sqlite-framework = { module = "androidx.sqlite:sqlite-framework", version.ref = "sqlite" } # WorkManager androidx-work-runtime-ktx = { group = "androidx.work", name = "work-runtime-ktx", version.ref = "work-runtime" } # Ktor (跨平台 HTTP 客户端) ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" } ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" } ktor-client-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" } ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" } ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" } ktor-client-auth = { module = "io.ktor:ktor-client-auth", version.ref = "ktor" } # Kotlinx 序列化 & 基础工具 kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinSerialization" } kotlinx-serialization-cbor = { module = "org.jetbrains.kotlinx:kotlinx-serialization-cbor", version.ref = "kotlinSerialization" } wire-runtime = { module = "com.squareup.wire:wire-runtime", version.ref = "wire" } okio = { module = "com.squareup.okio:okio", version.ref = "okio" } kgit = { module = "io.github.xingheyuzhuan:kgit", version.ref = "kgit" } aboutlibraries-compose-m3 = { module = "com.mikepenz:aboutlibraries-compose-m3", version.ref = "aboutLibraries" } coil-compose = { group = "io.coil-kt.coil3", name = "coil-compose", version.ref = "coil" } kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDateTime" } # Koin 依赖注入 koin-bom = { module = "io.insert-koin:koin-bom", version.ref = "koin" } koin-core = { module = "io.insert-koin:koin-core" } koin-android = { module = "io.insert-koin:koin-android" } koin-androidx-workmanager = { module = "io.insert-koin:koin-androidx-workmanager" } koin-compose = { module = "io.insert-koin:koin-compose" } koin-compose-viewmodel = { module = "io.insert-koin:koin-compose-viewmodel" } koin-compose-navigation3 = { module = "io.insert-koin:koin-compose-navigation3" } koin-annotations = { module = "io.insert-koin:koin-annotations", version.ref = "koin" } # Android 单元测试与 UI 测试 junit = { group = "junit", name = "junit", version.ref = "junit" } androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } [plugins] android-multiplatform-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" } android-application = { id = "com.android.application", version.ref = "agp" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } aboutLibraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutLibraries" } wire = { id = "com.squareup.wire", version.ref = "wire" } koin-compiler = { id = "io.insert-koin.compiler.plugin", version.ref = "koin-plugin" } androidx-room3 = { id = "androidx.room3", version.ref = "room3" }