Using Gradle version catalogs
This commit is contained in:
parent
8742836ec9
commit
692cb7ea17
3 changed files with 71 additions and 23 deletions
|
|
@ -52,31 +52,31 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
// AndroidX
|
// AndroidX
|
||||||
implementation("androidx.core:core-ktx:1.12.0")
|
implementation(libs.androidx.core.ktx)
|
||||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
implementation(libs.androidx.appcompat)
|
||||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
implementation(libs.androidx.constraintlayout)
|
||||||
implementation("androidx.fragment:fragment:1.6.2")
|
implementation(libs.androidx.fragment)
|
||||||
implementation("androidx.fragment:fragment-ktx:1.6.2")
|
implementation(libs.androidx.fragment.ktx)
|
||||||
implementation("androidx.recyclerview:recyclerview:1.3.2")
|
implementation(libs.androidx.recyclerview)
|
||||||
implementation("androidx.lifecycle:lifecycle-viewmodel:2.7.0")
|
implementation(libs.androidx.lifecycle.viewmodel)
|
||||||
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")
|
implementation(libs.androidx.lifecycle.viewmodel.ktx)
|
||||||
implementation("androidx.preference:preference:1.2.1")
|
implementation(libs.androidx.preference)
|
||||||
implementation("androidx.preference:preference-ktx:1.2.1")
|
implementation(libs.androidx.preference.ktx)
|
||||||
// Material Design
|
// Material Design
|
||||||
implementation("com.google.android.material:material:1.12.0-alpha03")
|
implementation(libs.material)
|
||||||
// Room
|
// Room
|
||||||
implementation("androidx.room:room-runtime:2.6.1")
|
implementation(libs.androidx.room.runtime)
|
||||||
implementation("androidx.room:room-ktx:2.6.1")
|
implementation(libs.androidx.room.ktx)
|
||||||
annotationProcessor("androidx.room:room-compiler:2.6.1")
|
annotationProcessor(libs.androidx.room.compiler)
|
||||||
ksp("androidx.room:room-compiler:2.6.1")
|
ksp(libs.androidx.room.compiler)
|
||||||
// Gson
|
// Gson
|
||||||
implementation("com.google.code.gson:gson:2.10.1")
|
implementation(libs.gson)
|
||||||
// Fast Scroll
|
// Fast Scroll
|
||||||
implementation("me.zhanghai.android.fastscroll:library:1.3.0")
|
implementation(libs.fast.scroll)
|
||||||
// Test
|
// Test
|
||||||
testImplementation("junit:junit:4.13.2")
|
testImplementation(libs.junit)
|
||||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
androidTestImplementation(libs.androidx.junit)
|
||||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
androidTestImplementation(libs.androidx.espresso.core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun String.exec(): String = exec(this)
|
fun String.exec(): String = exec(this)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.3.0" apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
|
alias(libs.plugins.kotlin.android) apply false
|
||||||
id("com.google.devtools.ksp") version "1.9.22-1.0.18" apply false
|
alias(libs.plugins.ksp) apply false
|
||||||
}
|
}
|
||||||
48
gradle/libs.versions.toml
Normal file
48
gradle/libs.versions.toml
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
[versions]
|
||||||
|
appcompat = "1.6.1"
|
||||||
|
constraintlayout = "2.1.4"
|
||||||
|
coreKtx = "1.12.0"
|
||||||
|
espressoCore = "3.5.1"
|
||||||
|
gson = "2.10.1"
|
||||||
|
junit = "4.13.2"
|
||||||
|
junitVersion = "1.1.5"
|
||||||
|
library = "1.3.0"
|
||||||
|
material = "1.12.0-alpha03"
|
||||||
|
preferenceKtx = "1.2.1"
|
||||||
|
preference = "1.2.1"
|
||||||
|
lifecycleViewmodelKtx = "2.7.0"
|
||||||
|
lifecycleViewmodel = "2.7.0"
|
||||||
|
recyclerview = "1.3.2"
|
||||||
|
fragmentKtx = "1.6.2"
|
||||||
|
fragment = "1.6.2"
|
||||||
|
roomRuntime = "2.6.1"
|
||||||
|
|
||||||
|
agp = "8.3.0"
|
||||||
|
kotlin-android = "1.9.22"
|
||||||
|
ksp = "1.9.22-1.0.18"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
|
||||||
|
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
|
||||||
|
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
|
||||||
|
androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" }
|
||||||
|
androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
|
||||||
|
androidx-preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" }
|
||||||
|
androidx-preference = { module = "androidx.preference:preference", version.ref = "preference" }
|
||||||
|
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
||||||
|
androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel", version.ref = "lifecycleViewmodel" }
|
||||||
|
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }
|
||||||
|
androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "fragmentKtx" }
|
||||||
|
androidx-fragment = { module = "androidx.fragment:fragment", version.ref = "fragment" }
|
||||||
|
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomRuntime" }
|
||||||
|
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "roomRuntime" }
|
||||||
|
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "roomRuntime" }
|
||||||
|
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
||||||
|
junit = { module = "junit:junit", version.ref = "junit" }
|
||||||
|
fast-scroll = { module = "me.zhanghai.android.fastscroll:library", version.ref = "library" }
|
||||||
|
material = { module = "com.google.android.material:material", version.ref = "material" }
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin-android" }
|
||||||
|
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||||
Loading…
Reference in a new issue