use toml version catalog

This commit is contained in:
5ec1cff 2025-01-14 14:18:42 +08:00
parent bdcc1d0b70
commit 0bb6e9df23
No known key found for this signature in database
GPG key ID: 609C383297F6FEBF
2 changed files with 43 additions and 46 deletions

43
gradle/libs.versions.toml Normal file
View file

@ -0,0 +1,43 @@
[versions]
agp = "8.8.0"
kotlin = "2.1.0"
ksp = "2.1.0-1.0.29"
golang = "1.0.4"
coroutine = "1.10.1"
coreKtx = "1.8.0"
activity = "1.5.0"
fragment = "1.5.0"
appcompat = "1.4.2"
coordinator = "1.2.0"
recyclerview = "1.2.1"
viewpager = "1.0.0"
material = "1.6.1"
serialization = "1.3.3"
kaidl = "1.15"
room = "2.4.2"
multiprocess = "1.0.0"
[libraries]
build-android = { module = "com.android.tools.build:gradle", version.ref = "agp" }
build-kotlin-common = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
build-kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
build-ksp = { module = "com.google.devtools.ksp:symbol-processing-gradle-plugin", version.ref = "ksp" }
build-golang = { module = "com.github.kr328.golang:gradle-plugin", version.ref = "golang" }
kotlin-coroutine = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutine" }
kotlin-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" }
androidx-core = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
androidx-activity = { module = "androidx.activity:activity", version.ref = "activity" }
androidx-fragment = { module = "androidx.fragment:fragment", version.ref = "fragment" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
androidx-coordinator = { module = "androidx.coordinatorlayout:coordinatorlayout", version.ref = "coordinator" }
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }
androidx-viewpager = { module = "androidx.viewpager2:viewpager2", version.ref = "viewpager" }
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" }
google-material = { module = "com.google.android.material:material", version.ref = "material" }
kaidl-compiler = { module = "com.github.kr328.kaidl:kaidl", version.ref = "kaidl" }
kaidl-runtime = { module = "com.github.kr328.kaidl:kaidl-runtime", version.ref = "kaidl" }
rikkax-multiprocess = { module = "dev.rikka.rikkax.preference:multiprocess", version.ref = "multiprocess" }
[plugins]

View file

@ -14,49 +14,3 @@ pluginManagement {
gradlePluginPortal()
}
}
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
val agp = "8.8.0"
val kotlin = "2.1.0"
val ksp = "$kotlin-1.0.29"
val golang = "1.0.4"
val coroutine = "1.10.1"
val coreKtx = "1.8.0"
val activity = "1.5.0"
val fragment = "1.5.0"
val appcompat = "1.4.2"
val coordinator = "1.2.0"
val recyclerview = "1.2.1"
val viewpager = "1.0.0"
val material = "1.6.1"
val serialization = "1.3.3"
val kaidl = "1.15"
val room = "2.4.2"
val multiprocess = "1.0.0"
library("build-android", "com.android.tools.build:gradle:$agp")
library("build-kotlin-common", "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin")
library("build-kotlin-serialization", "org.jetbrains.kotlin:kotlin-serialization:$kotlin")
library("build-ksp", "com.google.devtools.ksp:symbol-processing-gradle-plugin:$ksp")
library("build-golang", "com.github.kr328.golang:gradle-plugin:$golang")
library("kotlin-coroutine", "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine")
library("kotlin-serialization-json", "org.jetbrains.kotlinx:kotlinx-serialization-json:$serialization")
library("androidx-core", "androidx.core:core-ktx:$coreKtx")
library("androidx-activity", "androidx.activity:activity:$activity")
library("androidx-fragment", "androidx.fragment:fragment:$fragment")
library("androidx-appcompat", "androidx.appcompat:appcompat:$appcompat")
library("androidx-coordinator", "androidx.coordinatorlayout:coordinatorlayout:$coordinator")
library("androidx-recyclerview", "androidx.recyclerview:recyclerview:$recyclerview")
library("androidx-viewpager", "androidx.viewpager2:viewpager2:$viewpager")
library("androidx-room-compiler", "androidx.room:room-compiler:$room")
library("androidx-room-runtime", "androidx.room:room-runtime:$room")
library("androidx-room-ktx", "androidx.room:room-ktx:$room")
library("google-material", "com.google.android.material:material:$material")
library("kaidl-compiler", "com.github.kr328.kaidl:kaidl:$kaidl")
library("kaidl-runtime", "com.github.kr328.kaidl:kaidl-runtime:$kaidl")
library("rikkax-multiprocess", "dev.rikka.rikkax.preference:multiprocess:$multiprocess")
}
}
}