Skip to content

Commit e3ec427

Browse files
committed
Update dependencies and add version management plugins
- Add gradle-versions-plugin for dependency updates checking - Add version-catalog-update-plugin for automated updates - Update stable dependencies to latest versions: - compileSdk: 35 -> 36 (required by new AndroidX libs) - Compose BOM: 2025.03.01 -> 2025.12.01 - AndroidX core-ktx: 1.15.0 -> 1.17.0 - AndroidX lifecycle: 2.8.7 -> 2.10.0 - AndroidX navigation: 2.8.9 -> 2.9.6 - AndroidX work: 2.10.0 -> 2.11.0 - Koin: 4.0.4 -> 4.1.1 - Retrofit: 2.11.0 -> 3.0.0 - ONNX: 1.21.0 -> 1.23.2 - Material: 1.12.0 -> 1.13.0 - And other library updates - Pin critical versions (paging, agp, kotlin, ksp) to prevent breaking changes - Keep minSdk=24 for Android 7.0+ compatibility
1 parent d473f5b commit e3ec427

File tree

2 files changed

+146
-109
lines changed

2 files changed

+146
-109
lines changed

build.gradle.kts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,41 @@ plugins {
66
alias(libs.plugins.compose.compiler) apply false
77
alias(libs.plugins.google.ksp) apply false
88
alias(libs.plugins.androidx.room) apply false
9+
id("com.github.ben-manes.versions") version "0.51.0"
10+
id("nl.littlerobots.version-catalog-update") version "0.8.5"
11+
}
12+
13+
fun isNonStable(version: String): Boolean {
14+
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) }
15+
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
16+
val isStable = stableKeyword || regex.matches(version)
17+
return isStable.not()
18+
}
19+
20+
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
21+
rejectVersionIf {
22+
isNonStable(candidate.version) && !isNonStable(currentVersion)
23+
}
24+
}
25+
26+
versionCatalogUpdate {
27+
keep {
28+
// Keep versions that should not be updated
29+
keepUnusedVersions.set(true)
30+
keepUnusedLibraries.set(true)
31+
keepUnusedPlugins.set(true)
32+
}
33+
pin {
34+
// Pin versions that must not be updated
35+
versions.add("paging")
36+
versions.add("pagingCompose")
37+
versions.add("agp")
38+
versions.add("kotlin")
39+
versions.add("ksp")
40+
versions.add("versionName")
41+
versions.add("versionCode")
42+
versions.add("targetSdk")
43+
versions.add("compileSdk")
44+
versions.add("minSdk")
45+
}
946
}

gradle/libs.versions.toml

Lines changed: 109 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,128 @@
11
[versions]
2-
versionName = "0.7.0"
3-
versionCode = "191"
4-
targetSdk = "34"
5-
compileSdk = "35"
6-
minSdk = "24"
72
agp = "8.9.1"
3+
apacheStringUtils = "3.20.0"
4+
appcompat = "1.7.1"
5+
catppuccin = "0.1.2"
6+
compileSdk = "36"
7+
composeActivity = "1.12.2"
8+
composeBom = "2025.12.01"
9+
composeCompiler = "1.5.7"
10+
composeGestures = "4.0.0"
11+
composeJunit = "1.10.0"
12+
coreKtx = "1.17.0"
13+
crop = "0.1.1"
14+
crypto = "1.1.0"
15+
dayNightSwitch = "1.0.0"
16+
exif = "1.4.2"
17+
gson = "2.13.2"
18+
junit = "4.13.2"
19+
koin = "4.1.1"
20+
koinCompose = "4.1.1"
821
kotlin = "2.1.20"
922
ksp = "2.1.20-1.0.32" # Should match kotlin version
10-
appcompat = "1.7.0"
11-
composeCompiler = "1.5.7"
12-
composeBom = "2025.03.01"
13-
composeActivity = "1.10.1"
14-
composeJunit = "1.7.8"
15-
lifecycleViewModel = "2.8.7"
16-
navigation = "2.8.9"
23+
lifecycleViewModel = "2.10.0"
24+
material = "1.13.0"
25+
mediaPipeGenerator = "0.10.26.1"
26+
minSdk = "24"
27+
mockito = "2.2.0"
28+
mockk = "1.14.7"
29+
mvi = "1.0.2"
30+
navigation = "2.9.6"
31+
okhttp = "5.0.0-alpha.14"
32+
onnx = "1.23.2"
1733
paging = "3.1.1" # Do not upgrade!
1834
pagingCompose = "1.0.0-alpha18" # Do not upgrade!
19-
gson = "2.12.1"
20-
retrofit = "2.11.0"
21-
okhttp = "5.0.0-alpha.14"
22-
koin = "4.0.4"
23-
koinCompose = "4.0.4"
35+
preferences = "1.0.1"
36+
retrofit = "3.0.0"
37+
roboelectric = "4.16"
38+
room = "2.6.1"
2439
rxAndroidVersion = "3.0.2"
25-
rxJavaVersion = "3.1.10"
40+
rxJavaVersion = "3.1.12"
2641
rxKotlinVersion = "3.0.1"
2742
rxNetworkVersion = "4.0.0"
28-
material = "1.12.0"
29-
junit = "4.13.2"
30-
mockk = "1.13.17"
31-
mockito = "2.2.0"
32-
coreKtx = "1.15.0"
33-
crypto = "1.0.0"
34-
onnx = "1.21.0"
35-
workManager = "2.10.0"
36-
room = "2.6.1"
43+
serialization = "1.9.0"
44+
targetSdk = "34"
45+
testCoroutines = "1.10.2"
3746
timber = "5.0.1"
38-
exif = "1.4.0"
39-
apacheStringUtils = "3.17.0"
40-
composeGestures = "4.0.0"
41-
crop = "0.1.1"
42-
mvi = "1.0.2"
43-
preferences = "1.0.1"
44-
dayNightSwitch = "1.0.0"
45-
catppuccin = "0.1.2"
46-
turbine = "1.2.0"
47-
roboelectric = "4.14.1"
48-
testCoroutines = "1.10.1"
49-
mediaPipeGenerator = "0.10.21"
50-
serialization = "1.8.1"
47+
turbine = "1.2.1"
48+
versionCode = "191"
49+
versionName = "0.7.0"
50+
workManager = "2.11.0"
5151

5252
[libraries]
53-
android-tools-build-gradle = { group = "com.android.tools.build", name = "gradle", version.ref = "agp" }
54-
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
55-
apache-stringutils = { group = "org.apache.commons", name = "commons-lang3", version.ref = "apacheStringUtils" }
56-
androidx-core = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
57-
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
58-
androidx-compose-activity = { group = "androidx.activity", name = "activity-compose", version.ref = "composeActivity" }
59-
androidx-compose-viewmodel = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycleViewModel" }
60-
androidx-lifecycle-viewmodel = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewModel" }
61-
androidx-lifecycle-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "lifecycleViewModel" }
62-
androidx-compose-navigation = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigation" }
63-
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
64-
androidx-compose-runtime = { group = "androidx.compose.runtime", name = "runtime" }
65-
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" }
66-
androidx-compose-material-icons = { group = "androidx.compose.material", name = "material-icons-extended" }
67-
androidx-compose-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
68-
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
69-
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
70-
androidx-exif = { group = "androidx.exifinterface", name = "exifinterface", version.ref = "exif" }
71-
androidx-paging-runtime = { group = "androidx.paging", name = "paging-runtime", version.ref = "paging" }
72-
androidx-paging-rx = { group = "androidx.paging", name = "paging-rxjava3", version.ref = "paging" }
73-
androidx-paging-compose = { group = "androidx.paging", name = "paging-compose", version.ref = "pagingCompose" }
74-
androidx-security-crypto = { group = "androidx.security", name = "security-crypto", version.ref = "crypto" }
75-
androidx-room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" }
76-
androidx-room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
77-
androidx-room-rx = { group = "androidx.room", name = "room-rxjava3", version.ref = "room" }
78-
androidx-work-runtime = { group = "androidx.work", name = "work-runtime", version.ref = "workManager" }
79-
google-gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
80-
google-material = { group = "com.google.android.material", name = "material", version.ref = "material" }
81-
google-mediapipe-image-generator = { group = "com.google.mediapipe", name = "tasks-vision-image-generator", version.ref = "mediaPipeGenerator" }
82-
retrofit-core = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" }
83-
retrofit-converter-gson = { group = "com.squareup.retrofit2", name = "converter-gson", version.ref = "retrofit" }
84-
retrofit-adapter-rxjava3 = { group = "com.squareup.retrofit2", name = "adapter-rxjava3", version.ref = "retrofit" }
85-
okhttp-core = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
86-
okhttp-logging = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" }
87-
koin-core = { group = "io.insert-koin", name = "koin-core", version.ref = "koin" }
88-
koin-android = { group = "io.insert-koin", name = "koin-android", version.ref = "koin" }
89-
koin-compose = { group = "io.insert-koin", name = "koin-androidx-compose", version.ref = "koinCompose" }
90-
microsoft-onnx-runtime-android = { group = "com.microsoft.onnxruntime", name = "onnxruntime-android", version.ref = "onnx" }
91-
rx-android = { group = "io.reactivex.rxjava3", name = "rxandroid", version.ref = "rxAndroidVersion" }
92-
rx-java = { group = "io.reactivex.rxjava3", name = "rxjava", version.ref = "rxJavaVersion" }
93-
rx-kotlin = { group = "io.reactivex.rxjava3", name = "rxkotlin", version.ref = "rxKotlinVersion" }
94-
rx-network = { group = "io.github.softartdev", name = "reactivenetwork-rx3", version.ref = "rxNetworkVersion" }
95-
timber = { group = "com.jakewharton.timber", name = "timber", version.ref = "timber" }
96-
test-junit = { group = "junit", name = "junit", version.ref = "junit" }
97-
test-mockk = { group = "io.mockk", name = "mockk", version.ref = "mockk" }
98-
test-mockito = { group = "com.nhaarman.mockitokotlin2", name = "mockito-kotlin", version.ref = "mockito" }
99-
test-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "testCoroutines" }
100-
test-koin = { group = "io.insert-koin", name = "koin-test", version.ref = "koin" }
101-
test-koin-junit = { group = "io.insert-koin", name = "koin-test-junit4", version.ref = "koin" }
102-
test-turbine = { group = "app.cash.turbine", name = "turbine", version.ref = "turbine" }
103-
test-roboelectric = { group = "org.robolectric", name = "robolectric", version.ref = "roboelectric" }
104-
test-compose-junit = { group = "androidx.compose.ui", name = "ui-test-junit4", version.ref = "composeJunit" }
105-
test-compose-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest", version.ref = "composeJunit" }
106-
compose-gestures = { group = "com.github.SmartToolFactory", name = "Compose-Extended-Gestures", version.ref = "composeGestures" }
107-
compose-crop = { group = "io.github.mr0xf00", name = "easycrop", version.ref = "crop" }
108-
shifthackz-mvi = { group = "com.github.ShiftHackZ", name = "AndroidCoreMVI", version.ref = "mvi" }
109-
shifthackz-preferences = { group = "com.github.ShiftHackZ", name = "AndroidPreferences", version.ref = "preferences" }
110-
shifthackz-daynightswitch = { group = "com.github.ShiftHackZ", name = "DayNightSwitch", version.ref = "dayNightSwitch" }
111-
shifthackz-catppuccin-legacy = { group = "com.github.ShiftHackZ.Catppuccin-Android-Library", name = "palette-legacy", version.ref = "catppuccin" }
112-
shifthackz-catppuccin-compose = { group = "com.github.ShiftHackZ.Catppuccin-Android-Library", name = "compose", version.ref = "catppuccin" }
113-
shifthackz-catppuccin-splash = { group = "com.github.ShiftHackZ.Catppuccin-Android-Library", name = "splashscreen", version.ref = "catppuccin" }
114-
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "serialization" }
53+
android-tools-build-gradle = { module = "com.android.tools.build:gradle", version.ref = "agp" }
54+
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
55+
androidx-compose-activity = { module = "androidx.activity:activity-compose", version.ref = "composeActivity" }
56+
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" }
57+
androidx-compose-material-icons = { module = "androidx.compose.material:material-icons-extended" }
58+
androidx-compose-material3 = { module = "androidx.compose.material3:material3" }
59+
androidx-compose-navigation = { module = "androidx.navigation:navigation-compose", version.ref = "navigation" }
60+
androidx-compose-runtime = { module = "androidx.compose.runtime:runtime" }
61+
androidx-compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics" }
62+
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
63+
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
64+
androidx-compose-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycleViewModel" }
65+
androidx-core = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
66+
androidx-exif = { module = "androidx.exifinterface:exifinterface", version.ref = "exif" }
67+
androidx-lifecycle-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycleViewModel" }
68+
androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewModel" }
69+
androidx-paging-compose = { module = "androidx.paging:paging-compose", version.ref = "pagingCompose" }
70+
androidx-paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "paging" }
71+
androidx-paging-rx = { module = "androidx.paging:paging-rxjava3", version.ref = "paging" }
72+
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
73+
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
74+
androidx-room-rx = { module = "androidx.room:room-rxjava3", version.ref = "room" }
75+
androidx-security-crypto = { module = "androidx.security:security-crypto", version.ref = "crypto" }
76+
androidx-work-runtime = { module = "androidx.work:work-runtime", version.ref = "workManager" }
77+
apache-stringutils = { module = "org.apache.commons:commons-lang3", version.ref = "apacheStringUtils" }
78+
compose-crop = { module = "io.github.mr0xf00:easycrop", version.ref = "crop" }
79+
compose-gestures = { module = "com.github.SmartToolFactory:Compose-Extended-Gestures", version.ref = "composeGestures" }
80+
google-gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
81+
google-material = { module = "com.google.android.material:material", version.ref = "material" }
82+
google-mediapipe-image-generator = { module = "com.google.mediapipe:tasks-vision-image-generator", version.ref = "mediaPipeGenerator" }
83+
koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" }
84+
koin-compose = { module = "io.insert-koin:koin-androidx-compose", version.ref = "koinCompose" }
85+
koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
86+
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
87+
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" }
88+
microsoft-onnx-runtime-android = { module = "com.microsoft.onnxruntime:onnxruntime-android", version.ref = "onnx" }
89+
okhttp-core = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
90+
okhttp-logging = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
91+
retrofit-adapter-rxjava3 = { module = "com.squareup.retrofit2:adapter-rxjava3", version.ref = "retrofit" }
92+
retrofit-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" }
93+
retrofit-core = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
94+
rx-android = { module = "io.reactivex.rxjava3:rxandroid", version.ref = "rxAndroidVersion" }
95+
rx-java = { module = "io.reactivex.rxjava3:rxjava", version.ref = "rxJavaVersion" }
96+
rx-kotlin = { module = "io.reactivex.rxjava3:rxkotlin", version.ref = "rxKotlinVersion" }
97+
rx-network = { module = "io.github.softartdev:reactivenetwork-rx3", version.ref = "rxNetworkVersion" }
98+
shifthackz-catppuccin-compose = { module = "com.github.ShiftHackZ.Catppuccin-Android-Library:compose", version.ref = "catppuccin" }
99+
shifthackz-catppuccin-legacy = { module = "com.github.ShiftHackZ.Catppuccin-Android-Library:palette-legacy", version.ref = "catppuccin" }
100+
shifthackz-catppuccin-splash = { module = "com.github.ShiftHackZ.Catppuccin-Android-Library:splashscreen", version.ref = "catppuccin" }
101+
shifthackz-daynightswitch = { module = "com.github.ShiftHackZ:DayNightSwitch", version.ref = "dayNightSwitch" }
102+
shifthackz-mvi = { module = "com.github.ShiftHackZ:AndroidCoreMVI", version.ref = "mvi" }
103+
shifthackz-preferences = { module = "com.github.ShiftHackZ:AndroidPreferences", version.ref = "preferences" }
104+
test-compose-junit = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "composeJunit" }
105+
test-compose-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "composeJunit" }
106+
test-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "testCoroutines" }
107+
test-junit = { module = "junit:junit", version.ref = "junit" }
108+
test-koin = { module = "io.insert-koin:koin-test", version.ref = "koin" }
109+
test-koin-junit = { module = "io.insert-koin:koin-test-junit4", version.ref = "koin" }
110+
test-mockito = { module = "com.nhaarman.mockitokotlin2:mockito-kotlin", version.ref = "mockito" }
111+
test-mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
112+
test-roboelectric = { module = "org.robolectric:robolectric", version.ref = "roboelectric" }
113+
test-turbine = { module = "app.cash.turbine:turbine", version.ref = "turbine" }
114+
timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" }
115115

116116
[plugins]
117117
android-application = { id = "com.android.application", version.ref = "agp" }
118118
android-library = { id = "com.android.library", version.ref = "agp" }
119119
androidx-room = { id = "androidx.room", version.ref = "room" }
120+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
121+
generic-application = "generic.application:unspecified"
122+
generic-baseline-profm = "generic.baseline.profm:unspecified"
123+
generic-compose = "generic.compose:unspecified"
124+
generic-flavors = "generic.flavors:unspecified"
125+
generic-library = "generic.library:unspecified"
126+
google-ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
120127
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
121128
jetbrains-kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
122-
google-ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
123-
generic-flavors = { id = "generic.flavors", version = "unspecified" }
124-
generic-library = { id = "generic.library", version = "unspecified" }
125-
generic-baseline-profm = { id = "generic.baseline.profm", version = "unspecified" }
126-
generic-compose = { id = "generic.compose", version = "unspecified" }
127-
generic-application = { id = "generic.application", version = "unspecified" }
128-
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

0 commit comments

Comments
 (0)