[versions]
activity = "1.9.1"
coil-compose-version = "2.0.0-rc03"
core-ktx = "1.13.0"
google-gson = "2.9.1"
junit = "4.13.2"
kotlinx-coroutines-android = "1.6.2"
lifecycle = "2.8.7"
okhttp = "4.10.0"
ktor-version = "2.0.3"
androidx-test-ext-junit = "1.2.1"
espresso-core = "3.6.1"
appcompat = "1.7.0"
material = "1.12.0"
quickie-bundled = "1.10.0"
savedstate = "1.2.1"
mlkit-text = "16.0.1"
junit-ktx = "1.2.1"
mlkit-common-version = "18.11.0"
agp = "8.9.1"
kotlin = "2.1.10"
ksp = "2.1.10-1.0.30"
[libraries]
# androidx
core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" }
androidx-viewpager2 = "androidx.viewpager2:viewpager2:1.1.0"
androidx-work = "androidx.work:work-runtime:2.9.1"
androidx-swiperefreshlayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version = "2.2.0" }
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "activity" }
androidx-webkit = "androidx.webkit:webkit:1.12.1"
documentfile = "androidx.documentfile:documentfile:1.0.1"
androidx-savedstate = { module = "androidx.savedstate:savedstate", version.ref = "savedstate" }
androidx-savedstate-ktx = { module = "androidx.savedstate:savedstate-ktx", version.ref = "savedstate" }
preference-ktx = "androidx.preference:preference-ktx:1.2.1"
androidx-annotation = "androidx.annotation:annotation:1.9.1"
activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activity" }
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
# material ======================================
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
compose-material3 = "androidx.compose.material3:material3:1.3.1"
compose-material3-window-size = "androidx.compose.material3:material3-window-size-class:1.3.1"
compose-material3-adaptive-navigation-suite = "androidx.compose.material3:material3-adaptive-navigation-suite:1.3.1"
#lifecycle
lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" }
lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle" }
lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime", version.ref = "lifecycle" }
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle" }
lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle" }
lifecycle-viewmodel-savedstate = { module = "androidx.lifecycle:lifecycle-viewmodel-savedstate", version.ref = "lifecycle" }
lifecycle-compiler = { module = "androidx.lifecycle:lifecycle-compiler", version.ref = "lifecycle" }
lifecycle-service = { module = "androidx.lifecycle:lifecycle-service", version.ref = "lifecycle" }
# androidx compose
compose-bom = "androidx.compose:compose-bom:2025.02.00"
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
compose-material = { module = "androidx.compose.material:material" }
compose-ui = { module = "androidx.compose.ui:ui" }
compose-foundation = { module = "androidx.compose.foundation:foundation" }
compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout" }
compose-animation-core = { module = "androidx.compose.animation:animation-core" }
compose-animation = { module = "androidx.compose.animation:animation" }
##########################
# rhino
mozilla-rhino = "org.mozilla:rhino:1.8.0"
mozilla-rhino-xml = "org.mozilla:rhino-xml:1.8.0"
mozilla-rhino-tools = "org.mozilla:rhino-tools:1.8.0"
# commons
commons-exec = "org.apache.commons:commons-exec:1.3"
commons-io = "commons-io:commons-io:2.6"
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines-android" }
google-gson = { module = "com.google.code.gson:gson", version.ref = "google-gson" }
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
# ktor
ktor-server-core = { module = "io.ktor:ktor-server-core", version.ref = "ktor-version" }
ktor-server-netty = { module = "io.ktor:ktor-server-netty", version.ref = "ktor-version" }
ktor-server-websockets = { module = "io.ktor:ktor-server-websockets", version.ref = "ktor-version" }
ktor-client-websockets = { module = "io.ktor:ktor-client-websockets", version.ref = "ktor-version" }
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor-version" }
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor-version" }
# mlkit
mlkit-common = { group = "com.google.mlkit", name = "common", version.ref = "mlkit-common-version" }
mlkit-text-recognition = { module = "com.google.mlkit:text-recognition", version.ref = "mlkit-text" }
mlkit-text-recognition-chinese = { module = "com.google.mlkit:text-recognition-chinese", version.ref = "mlkit-text" }
mlkit-text-recognition-devanagari = { module = "com.google.mlkit:text-recognition-devanagari", version.ref = "mlkit-text" }
mlkit-text-recognition-japanese = { module = "com.google.mlkit:text-recognition-japanese", version.ref = "mlkit-text" }
mlkit-text-recognition-korean = { module = "com.google.mlkit:text-recognition-korean", version.ref = "mlkit-text" }
#rxjava
quickie-bundled = { module = "io.github.g00fy2.quickie:quickie-bundled", version.ref = "quickie-bundled" }
rxjava2 = "io.reactivex.rxjava2:rxjava:2.2.21"
rxjava2-rxandroid = "io.reactivex.rxjava2:rxandroid:2.1.1"
rxjava3 = "io.reactivex.rxjava3:rxjava:3.1.5"
rxjava3-rxandroid = "io.reactivex.rxjava3:rxandroid:3.0.2"
javet-android-node = "com.caoccao.javet:javet-android-node:3.1.4"
#shizuku
shizuku-api = "dev.rikka.shizuku:api:13.1.5"
shizuku-provider = "dev.rikka.shizuku:provider:13.1.5"
ktsh = "com.jaredrummler:ktsh:1.0.0"
#test libraries ===================================
junit = { module = "junit:junit", version.ref = "junit" }
androidx-junit-ktx = { group = "androidx.test.ext", name = "junit-ktx", version.ref = "junit-ktx" }
#leakcanary
leakcanary-android = "com.squareup.leakcanary:leakcanary-android:2.13"
leakcanary-objectinfo-watcher-android = "com.squareup.leakcanary:leakcanary-object-watcher-android:2.13"
retrofit2-retrofit = "com.squareup.retrofit2:retrofit:2.9.0"
retrofit2-converter-gson = "com.squareup.retrofit2:converter-gson:2.9.0"
test-runner = "androidx.test:runner:1.6.2"
test-rules = "androidx.test:rules:1.6.1"
androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-ext-junit" }
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" }
timscriptov-apksigner = "com.github.TimScriptov:apksigner:1.2.0"
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil-compose-version" }
#Deprecated ========================================
#Glide
glide = "com.github.bumptech.glide:glide:4.8.0"
glide-ksp = "com.github.bumptech.glide:ksp:4.14.2"
glide-compiler = "com.github.bumptech.glide:compiler:4.12.0"
[plugins]
agp-app = { id = "com.android.application", version.ref = "agp" }
agp-lib = { id = "com.android.library", version.ref = "agp" }
kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
[bundles]
ktor = ["ktor-server-core", "ktor-server-netty", "ktor-server-websockets", "ktor-client-websockets", "ktor-client-okhttp", "ktor-client-core"]
mlkit = [
"mlkit-text-recognition",
"mlkit-text-recognition-chinese",
"mlkit-text-recognition-devanagari",
"mlkit-text-recognition-japanese",
"mlkit-text-recognition-korean"
]
shizuku = ["shizuku-api", "shizuku-provider"]
这个是一个Android Studio 的 libs.versions.toml 文件的代码,请帮我重构,去掉重复的代码,类似于ktsh = "com.jaredrummler:ktsh:1.0.0"这样的代码,修改为 module 或在 group 格式,并且在[versions]中定义版本号