Skip to content

Commit 1038c77

Browse files
committed
Migrate to toml version management
1 parent de0bf0f commit 1038c77

File tree

3 files changed

+116
-40
lines changed

3 files changed

+116
-40
lines changed

core-sdk-samples/higgs-shop-sample-app/app/build.gradle.kts

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -56,67 +56,67 @@ android {
5656

5757
dependencies {
5858
// AndroidX BOM
59-
implementation(platform("androidx.compose:compose-bom:2024.01.00"))
60-
implementation("androidx.compose.runtime:runtime")
61-
implementation("androidx.compose.ui:ui")
62-
implementation("androidx.compose.material:material")
63-
debugImplementation("androidx.compose.ui:ui-tooling")
64-
implementation("androidx.compose.runtime:runtime-livedata")
59+
implementation(platform(libs.androidx.compose.bom))
60+
implementation(libs.androidx.compose.runtime.runtime)
61+
implementation(libs.androidx.compose.ui)
62+
implementation(libs.androidx.compose.material.material)
63+
debugImplementation(libs.androidx.compose.ui.tooling)
64+
implementation(libs.androidx.compose.runtime.livedata)
6565

6666
// Core AndroidX dependencies
67-
implementation("androidx.core:core-ktx:1.12.0")
68-
implementation("androidx.appcompat:appcompat:1.6.1")
69-
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
70-
implementation("androidx.fragment:fragment-ktx:1.6.2")
71-
implementation("androidx.recyclerview:recyclerview:1.3.2")
67+
implementation(libs.androidx.core.ktx)
68+
implementation(libs.appcompat)
69+
implementation(libs.androidx.constraintlayout)
70+
implementation(libs.androidx.fragment.ktx)
71+
implementation(libs.androidx.recyclerview)
7272

7373
// Lifecycle
74-
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
75-
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.7.0")
76-
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")
74+
implementation(libs.androidx.lifecycle.runtime.ktx)
75+
implementation(libs.lifecycle.livedata.ktx)
76+
implementation(libs.androidx.lifecycle.viewmodel.ktx)
7777

7878
// Navigation
79-
implementation("androidx.navigation:navigation-fragment-ktx:2.7.7")
80-
implementation("androidx.navigation:navigation-ui-ktx:2.7.7")
79+
implementation(libs.androidx.navigation.fragment.ktx)
80+
implementation(libs.navigation.ui.ktx)
8181

8282
// Room
83-
implementation("androidx.room:room-runtime:2.6.1")
84-
implementation("androidx.room:room-ktx:2.6.1")
85-
ksp("androidx.room:room-compiler:2.6.1")
83+
implementation(libs.androidx.room.runtime)
84+
implementation(libs.androidx.room.ktx)
85+
ksp(libs.androidx.room.compiler)
8686

8787
// Coroutines
88-
implementation(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.3"))
89-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android")
90-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
88+
implementation(platform(libs.kotlinx.coroutines.bom))
89+
implementation(libs.org.jetbrains.kotlinx.coroutines.android)
90+
implementation(libs.org.jetbrains.kotlinx.coroutines.core)
9191

9292
// OkHttp
93-
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.12.0"))
94-
implementation("com.squareup.okhttp3:okhttp")
95-
implementation("com.squareup.okhttp3:logging-interceptor")
93+
implementation(platform(libs.okhttp.bom))
94+
implementation(libs.okhttp3.okhttp)
95+
implementation(libs.squareup.logging.interceptor)
9696

9797
// Retrofit
98-
implementation("com.squareup.retrofit2:retrofit:2.9.0")
99-
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
98+
implementation(libs.com.squareup.retrofit)
99+
implementation(libs.com.squareup.retrofit.converter.gson)
100100

101101
// mParticle
102102
implementation("com.mparticle:android-core:5+")
103103
implementation("com.mparticle:android-kit-base:5+")
104104
implementation("com.mparticle:android-rokt-kit:5+")
105105

106106
// Google Services
107-
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
107+
implementation(libs.play.services.ads.identifier)
108108

109109
// Other dependencies
110-
implementation("com.google.android.material:material:1.11.0")
111-
implementation("com.google.code.gson:gson:2.10.1")
112-
implementation("com.github.bumptech.glide:glide:4.16.0")
113-
ksp("com.github.bumptech.glide:compiler:4.16.0")
110+
implementation(libs.material)
111+
implementation(libs.gson)
112+
implementation(libs.glide)
113+
ksp(libs.compiler.glide)
114114

115115
// Testing dependencies
116-
testImplementation("junit:junit:4.13.2")
117-
androidTestImplementation("androidx.test.ext:junit:1.1.5")
118-
androidTestImplementation("androidx.test.ext:junit-ktx:1.1.5")
119-
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
116+
testImplementation(libs.junit)
117+
androidTestImplementation(libs.androidx.junit)
118+
androidTestImplementation(libs.androidx.junit.ktx)
119+
androidTestImplementation(libs.androidx.espresso.core)
120120
}
121121

122122
fun buildVersionCode(): Int {

core-sdk-samples/higgs-shop-sample-app/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ buildscript {
66
mavenCentral()
77
}
88
dependencies {
9-
classpath("com.android.tools.build:gradle:8.6.1")
10-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
11-
classpath("com.google.gms:google-services:4.3.14")
9+
classpath(libs.gradle)
10+
classpath(libs.kotlin.gradle.plugin)
11+
classpath(libs.google.services)
1212
}
1313
}
1414

1515
plugins {
16-
id("com.google.devtools.ksp") version "1.9.25-1.0.20" apply false
16+
alias(libs.plugins.ksp) apply false
1717
}
1818

1919
tasks.register("clean", Delete::class) {

gradle/libs.versions.toml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[versions]
2+
androidxConstraintlayout = "2.1.4"
3+
androidxFragmentKtxVersion = "1.6.2"
4+
androidxLifecycleViewmodelKtx = "2.7.0"
5+
androidxRecyclerviewRecyclerview = "1.3.2"
6+
androidxRoomKtxVersion = "2.6.1"
7+
androidxRoomRoomCompiler = "2.6.1"
8+
androidxRoomRuntime = "2.6.1"
9+
appcompatVersion = "1.6.1"
10+
compiler = "4.16.0"
11+
composeBom = "2024.01.00"
12+
comSquareupRetrofit2ConverterGson2 = "2.9.0"
13+
comSquareupRetrofit2Retrofit = "2.9.0"
14+
coreKtx = "1.12.0"
15+
espressoCore = "3.5.1"
16+
glide = "4.16.0"
17+
googleServices = "4.3.14"
18+
gradle = "8.6.1"
19+
gson = "2.10.1"
20+
junit = "4.13.2"
21+
junitVersion = "1.1.5"
22+
junitKtx = "1.1.5"
23+
kotlinGradlePlugin = "1.9.25"
24+
kotlinxCoroutinesBom = "1.7.3"
25+
ksp = "1.9.25-1.0.20"
26+
lifecycleLivedataKtxVersion = "2.7.0"
27+
lifecycleRuntimeKtx = "2.7.0"
28+
material = "1.11.0"
29+
navigationFragmentKtx = "2.7.7"
30+
navigationUiKtxVersion = "2.7.7"
31+
okhttpBom = "4.12.0"
32+
playServicesAdsIdentifier = "18.0.1"
33+
34+
[libraries]
35+
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" }
36+
androidx-compose-material-material = { module = "androidx.compose.material:material" }
37+
androidx-compose-runtime-runtime = { module = "androidx.compose.runtime:runtime" }
38+
androidx-compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata" }
39+
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
40+
androidx-compose-ui = { module = "androidx.compose.ui:ui" }
41+
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidxConstraintlayout" }
42+
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
43+
androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" }
44+
androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidxFragmentKtxVersion" }
45+
androidx-junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "junitKtx" }
46+
androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
47+
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidxLifecycleViewmodelKtx" }
48+
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
49+
androidx-navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigationFragmentKtx" }
50+
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "androidxRecyclerviewRecyclerview" }
51+
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "androidxRoomRoomCompiler" }
52+
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "androidxRoomKtxVersion" }
53+
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "androidxRoomRuntime" }
54+
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompatVersion" }
55+
com-squareup-retrofit-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "comSquareupRetrofit2ConverterGson2" }
56+
com-squareup-retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "comSquareupRetrofit2Retrofit" }
57+
compiler-glide = { module = "com.github.bumptech.glide:compiler", version.ref = "compiler" }
58+
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
59+
google-services = { module = "com.google.gms:google-services", version.ref = "googleServices" }
60+
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
61+
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
62+
junit = { module = "junit:junit", version.ref = "junit" }
63+
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinGradlePlugin" }
64+
kotlinx-coroutines-bom = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-bom", version.ref = "kotlinxCoroutinesBom" }
65+
lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtxVersion" }
66+
material = { module = "com.google.android.material:material", version.ref = "material" }
67+
navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigationUiKtxVersion" }
68+
okhttp-bom = { module = "com.squareup.okhttp3:okhttp-bom", version.ref = "okhttpBom" }
69+
okhttp3-okhttp = { module = "com.squareup.okhttp3:okhttp" }
70+
org-jetbrains-kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android" }
71+
org-jetbrains-kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core" }
72+
play-services-ads-identifier = { module = "com.google.android.gms:play-services-ads-identifier", version.ref = "playServicesAdsIdentifier" }
73+
squareup-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor" }
74+
75+
[plugins]
76+
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }

0 commit comments

Comments
 (0)