Skip to content

Commit 7f9f89c

Browse files
authored
Use version catalog bundles for coil and lifecycle (recloudstream#2237)
1 parent 009dcc2 commit 7f9f89c

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

app/build.gradle.kts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ dependencies {
173173
implementation(libs.core.ktx)
174174
implementation(libs.activity.ktx)
175175
implementation(libs.appcompat)
176-
implementation(libs.bundles.navigationKtx)
177-
implementation(libs.lifecycle.livedata.ktx)
178-
implementation(libs.lifecycle.viewmodel.ktx)
176+
implementation(libs.bundles.lifecycle)
177+
implementation(libs.bundles.navigation)
179178

180179
// Design & UI
181180
implementation(libs.preference.ktx)
@@ -184,21 +183,20 @@ dependencies {
184183
implementation(libs.swiperefreshlayout)
185184

186185
// Coil Image Loading
187-
implementation(libs.coil)
188-
implementation(libs.coil.network.okhttp)
186+
implementation(libs.bundles.coil)
189187

190188
// Media 3 (ExoPlayer)
191189
implementation(libs.bundles.media3)
192190
implementation(libs.video)
193191

192+
// FFmpeg Decoding
193+
implementation(libs.bundles.nextlib)
194+
194195
// PlayBack
195196
implementation(libs.colorpicker) // Subtitle Color Picker
196197
implementation(libs.newpipeextractor) // For Trailers
197198
implementation(libs.juniversalchardet) // Subtitle Decoding
198199

199-
// FFmpeg Decoding
200-
implementation(libs.bundles.nextlibMedia3)
201-
202200
// UI Stuff
203201
implementation(libs.shimmer) // Shimmering Effect (Loading Skeleton)
204202
implementation(libs.palette.ktx) // Palette for Images -> Colors

gradle/libs.versions.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ junitVersion = "1.3.0"
2424
juniversalchardet = "2.5.0"
2525
kotlinGradlePlugin = "2.2.21"
2626
kotlinxCoroutinesCore = "1.10.2"
27-
lifecycleLivedataKtx = "2.9.4"
28-
lifecycleViewmodelKtx = "2.9.4"
27+
lifecycleKtx = "2.9.4"
2928
material = "1.14.0-alpha06"
3029
media3 = "1.8.0"
3130
navigationKtx = "2.9.6"
@@ -77,8 +76,8 @@ junit = { module = "junit:junit", version.ref = "junit" }
7776
junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "junitKtx" }
7877
juniversalchardet = { module = "com.github.albfernandez:juniversalchardet", version.ref = "juniversalchardet" }
7978
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" }
80-
lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
81-
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
79+
lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleKtx" }
80+
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleKtx" }
8281
material = { module = "com.google.android.material:material", version.ref = "material" }
8382
media3-cast = { module = "androidx.media3:media3-cast", version.ref = "media3" }
8483
media3-common = { module = "androidx.media3:media3-common", version.ref = "media3" }
@@ -123,6 +122,8 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm" , version.ref = "kotlinGradlePlug
123122
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlinGradlePlugin" }
124123

125124
[bundles]
125+
coil = ["coil", "coil-network-okhttp"]
126+
lifecycle = ["lifecycle-livedata-ktx", "lifecycle-viewmodel-ktx"]
126127
media3 = ["media3-cast", "media3-common", "media3-container", "media3-datasource-cronet", "media3-datasource-okhttp", "media3-exoplayer", "media3-exoplayer-dash", "media3-exoplayer-hls", "media3-session", "media3-ui"]
127-
navigationKtx = ["navigation-fragment-ktx", "navigation-ui-ktx"]
128-
nextlibMedia3 = ["nextlib-media3ext", "nextlib-mediainfo"]
128+
navigation = ["navigation-fragment-ktx", "navigation-ui-ktx"]
129+
nextlib = ["nextlib-media3ext", "nextlib-mediainfo"]

0 commit comments

Comments
 (0)