Skip to content

Commit f37a275

Browse files
committed
Upgrade libraries version and gradle wrapper
1 parent 4169fd5 commit f37a275

File tree

11 files changed

+337
-208
lines changed

11 files changed

+337
-208
lines changed

app/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
55
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
66

77
plugins {
8-
id("com.android.application")
9-
id("kotlin-android")
10-
id("org.jetbrains.dokka")
8+
alias(libs.plugins.android.application)
9+
alias(libs.plugins.dokka.gradle.plugin)
10+
alias(libs.plugins.kotlin.android)
1111
}
1212

1313
val javaTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())

app/src/main/java/com/lagradost/cloudstream3/ui/player/UpdatedMatroskaExtractor.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ import androidx.media3.common.util.Log
3737
import androidx.media3.common.util.ParsableByteArray
3838
import androidx.media3.common.util.UnstableApi
3939
import androidx.media3.common.util.Util
40+
import androidx.media3.container.DolbyVisionConfig;
4041
import androidx.media3.container.NalUnitUtil
4142
import androidx.media3.extractor.AacUtil
4243
import androidx.media3.extractor.AvcConfig
4344
import androidx.media3.extractor.ChunkIndex
44-
import androidx.media3.extractor.DolbyVisionConfig
4545
import androidx.media3.extractor.Extractor
4646
import androidx.media3.extractor.ExtractorInput
4747
import androidx.media3.extractor.ExtractorOutput
@@ -51,11 +51,11 @@ import androidx.media3.extractor.MpegAudioUtil
5151
import androidx.media3.extractor.PositionHolder
5252
import androidx.media3.extractor.SeekMap
5353
import androidx.media3.extractor.SeekMap.Unseekable
54+
import androidx.media3.extractor.text.SubtitleParser
55+
import androidx.media3.extractor.text.SubtitleTranscodingExtractorOutput
5456
import androidx.media3.extractor.TrackOutput
5557
import androidx.media3.extractor.TrackOutput.CryptoData
5658
import androidx.media3.extractor.TrueHdSampleRechunker
57-
import androidx.media3.extractor.text.SubtitleParser
58-
import androidx.media3.extractor.text.SubtitleTranscodingExtractorOutput
5959
import com.google.common.collect.ImmutableList
6060
import java.io.IOException
6161
import java.nio.ByteBuffer

build.gradle.kts

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
1-
buildscript {
2-
repositories {
3-
google()
4-
mavenCentral()
5-
}
1+
plugins {
2+
alias(libs.plugins.android.application) apply false
3+
alias(libs.plugins.android.library) apply false
4+
alias(libs.plugins.buildkonfig.gradle.plugin) apply false // Universal build config
5+
alias(libs.plugins.dokka.gradle.plugin) apply false
6+
alias(libs.plugins.gradle.versions.plugin) // do not "apply false" as it's used only in the root project
7+
alias(libs.plugins.kotlin.android) apply false
8+
alias(libs.plugins.kotlin.jvm) apply false
9+
alias(libs.plugins.kotlin.multiplatform) apply false
10+
}
611

7-
dependencies {
8-
classpath(libs.gradle)
9-
classpath(libs.jetbrains.kotlin.gradle.plugin)
10-
classpath(libs.dokka.gradle.plugin)
11-
// Universal build config
12-
classpath(libs.buildkonfig.gradle.plugin)
12+
// Task to list dependencies updates // https://github.com/ben-manes/gradle-versions-plugin
13+
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
14+
rejectVersionIf {
15+
isNonStable(candidate.version)
1316
}
1417
}
1518

16-
allprojects {
17-
repositories {
18-
google()
19-
mavenCentral()
20-
mavenLocal()
21-
maven("https://jitpack.io")
19+
fun isNonStable(version: String): Boolean {
20+
var containsUnstableKeyword = listOf("alpha", "beta", "rc", "cr", "m", "preview", "snapshot").any {
21+
version.contains(it, ignoreCase = true)
22+
}
23+
val containsStableKeyword = listOf("release", "final", "ga").any {
24+
version.contains(it, ignoreCase = true)
2225
}
26+
val matchesGitCommitRegex = Regex("""^([0-9a-f]{40}|[0-9a-f]{6,8})$""").matches(version)
27+
val matchesStableRegex = Regex("""^[0-9,.v-]+(-r)?$""").matches(version)
28+
val isStable = containsStableKeyword || matchesStableRegex || matchesGitCommitRegex
29+
return containsUnstableKeyword || !isStable
2330
}

docs/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
kotlin("jvm")
3-
id("org.jetbrains.dokka")
2+
alias(libs.plugins.kotlin.jvm)
3+
alias(libs.plugins.dokka.gradle.plugin)
44
}
55

66
dependencies {

gradle/libs.versions.toml

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,53 @@
1+
# https://docs.gradle.org/current/userguide/plugins.html#sec:version_catalog_plugin_application
2+
# https://docs.gradle.org/current/userguide/dependency_versions.html#sec:strict-version
13
[versions]
24
acraCore = "5.12.0"
5+
androidGradlePlugin = { strictly = "8.9.3" } # "android in all their incompetence makes gradle version very tied to the IDE version of Android Studio. Due to this, gradle should lag behind"
6+
androidToolsUtp = "31.12.0"
37
appcompat = "1.7.1"
4-
biometric = "1.4.0-alpha04"
5-
buildkonfigGradlePlugin = "0.15.2"
6-
coil = "3.1.0"
8+
biometric = { require = "1.4.0-alpha04" }
9+
buildkonfigGradlePlugin = "0.17.1"
10+
coil = { strictly = "[3.1, 3.3[", prefer = "3.2.0"} # do not update above 3.2, it's tied to "kotlinGradlePlugin" version
711
colorpicker = "6b46b49bd5"
8-
conscryptAndroid = "2.5.2"
12+
conscryptAndroid = { strictly = "2.5.2" } # 2.5.3+ crashes everything for everyone.
913
constraintlayout = "2.2.1"
1014
coreKtx = "1.16.0"
1115
desugar_jdk_libs_nio = "2.1.5"
1216
dokkaGradlePlugin = "2.0.0"
13-
espressoCore = "3.6.1"
17+
espressoCore = "3.7.0"
1418
fuzzywuzzy = "1.4.0"
15-
gradle = "8.9.3"
16-
jacksonModuleKotlin = "2.13.1"
17-
json = "20250107"
19+
gradleVersionsPlugin = "0.52.0"
20+
jacksonModuleKotlin = { strictly = "2.13.1" } # do not upgrade above 2.13.1, Crashes on Android TV's and FireSticks that have Min API Level 25 or Less.
21+
json = "20250517"
1822
junit = "4.13.2"
19-
junitKtx = "1.2.1"
20-
junitVersion = "1.2.1"
23+
junitKtx = "1.3.0"
24+
junitVersion = "1.3.0"
2125
juniversalchardet = "2.5.0"
22-
kotlinGradlePluginVersion = "2.1.10"
23-
kotlinxCoroutinesCore = "1.10.1"
24-
lifecycleLivedataKtx = "2.8.7"
25-
lifecycleViewmodelKtx = "2.8.7"
26+
kotlinGradlePlugin = { strictly = "[2.1, 2.2[" } # do not upgrade above 2.1, it's tied to "androidGradle" version
27+
kotlinxCoroutinesCore = "1.10.2"
28+
lifecycleLivedataKtx = "2.9.2"
29+
lifecycleViewmodelKtx = "2.9.2"
2630
material = "1.12.0"
27-
media3 = "1.6.1"
28-
navigationKtx = "2.8.9"
29-
newpipeextractor = "v0.24.6"
31+
media3 = "1.8.0"
32+
navigationKtx = "2.9.3"
33+
newpipeextractor = "0.24.8"
3034
nextlibMedia3 = "0.8.4"
3135
nicehttp = "0.4.13"
3236
overlappingpanels = "0.1.5"
3337
paletteKtx = "1.0.0"
3438
preferenceKtx = "1.2.1"
3539
previewseekbarMedia3 = "1.1.1.0"
36-
qrcodeKotlin = "4.3.0"
40+
qrcodeKotlin = "4.5.0"
3741
rhino = "1.8.0"
3842
safefile = "0.0.8"
3943
shimmer = "0.5.0"
4044
swiperefreshlayout = "1.1.0"
41-
tmdbJava = "2.11.0"
45+
tmdbJava = "2.12.0"
4246
torrentserver = "7861970e038b35cd8c6918384e49caf26903e09e"
43-
tvprovider = "1.0.0"
47+
tvprovider = "1.1.0"
4448
video = "1.0.0"
45-
workRuntime = "2.10.0"
46-
workRuntimeKtx = "2.10.0"
49+
workRuntime = "2.10.3"
50+
workRuntimeKtx = "2.10.3"
4751

4852
jvmTarget = "1.8"
4953
minSdk = "21"
@@ -53,34 +57,34 @@ targetSdk = "35"
5357
[libraries]
5458
acra-core = { module = "ch.acra:acra-core", version.ref = "acraCore" }
5559
acra-toast = { module = "ch.acra:acra-toast", version.ref = "acraCore" }
60+
android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" }
5661
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
5762
biometric = { module = "androidx.biometric:biometric", version.ref = "biometric" }
58-
buildkonfig-gradle-plugin = { module = "com.codingfeline.buildkonfig:buildkonfig-gradle-plugin", version.ref = "buildkonfigGradlePlugin" }
5963
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
6064
coil-network-okhttp = { module = "io.coil-kt.coil3:coil-network-okhttp", version.ref = "coil" }
6165
colorpicker = { module = "com.github.recloudstream:color-picker-android", version.ref = "colorpicker" }
6266
conscrypt-android = { module = "org.conscrypt:conscrypt-android", version.ref = "conscryptAndroid" }
6367
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
6468
core = { module = "androidx.test:core" }
6569
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
70+
databinding = { module = "androidx.databinding:viewbinding", version.ref = "androidGradlePlugin" }
6671
desugar_jdk_libs_nio = { module = "com.android.tools:desugar_jdk_libs_nio", version.ref = "desugar_jdk_libs_nio" }
67-
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokkaGradlePlugin" }
6872
espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" }
6973
ext-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
7074
fuzzywuzzy = { module = "me.xdrop:fuzzywuzzy", version.ref = "fuzzywuzzy" }
71-
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
7275
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jacksonModuleKotlin" }
73-
jetbrains-kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinGradlePluginVersion" }
7476
json = { module = "org.json:json", version.ref = "json" }
7577
junit = { module = "junit:junit", version.ref = "junit" }
7678
junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "junitKtx" }
7779
juniversalchardet = { module = "com.github.albfernandez:juniversalchardet", version.ref = "juniversalchardet" }
80+
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinGradlePlugin" }
7881
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" }
7982
lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
8083
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
8184
material = { module = "com.google.android.material:material", version.ref = "material" }
8285
media3-cast = { module = "androidx.media3:media3-cast", version.ref = "media3" }
8386
media3-common = { module = "androidx.media3:media3-common", version.ref = "media3" }
87+
media3-container = { module = "androidx.media3:media3-container ", version.ref = "media3" }
8488
media3-datasource-okhttp = { module = "androidx.media3:media3-datasource-okhttp", version.ref = "media3" }
8589
media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "media3" }
8690
media3-exoplayer-dash = { module = "androidx.media3:media3-exoplayer-dash", version.ref = "media3" }
@@ -98,8 +102,8 @@ palette-ktx = { module = "androidx.palette:palette-ktx", version.ref = "paletteK
98102
preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" }
99103
previewseekbar-media3 = { module = "com.github.rubensousa:previewseekbar-media3", version.ref = "previewseekbarMedia3" }
100104
qrcode-kotlin = { module = "io.github.g0dkar:qrcode-kotlin", version.ref = "qrcodeKotlin" }
101-
rhino = { module = "org.mozilla:rhino", version.ref = "rhino" }
102105
quickjs = { module = "app.cash.quickjs:quickjs-android", version = "0.9.2" }
106+
rhino = { module = "org.mozilla:rhino", version.ref = "rhino" }
103107
safefile = { module = "com.github.LagradOst:SafeFile", version.ref = "safefile" }
104108
shimmer = { module = "com.facebook.shimmer:shimmer", version.ref = "shimmer" }
105109
swiperefreshlayout = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version.ref = "swiperefreshlayout" }
@@ -111,8 +115,16 @@ work-runtime = { module = "androidx.work:work-runtime", version.ref = "workRunti
111115
work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workRuntimeKtx" }
112116

113117
[plugins]
118+
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
119+
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
120+
buildkonfig-gradle-plugin = { id = "com.codingfeline.buildkonfig", version.ref = "buildkonfigGradlePlugin" }
121+
dokka-gradle-plugin = { id = "org.jetbrains.dokka", version.ref = "dokkaGradlePlugin" }
122+
gradle-versions-plugin = { id = "com.github.ben-manes.versions", version.ref = "gradleVersionsPlugin" }
123+
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinGradlePlugin" }
124+
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm" , version.ref = "kotlinGradlePlugin" }
125+
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlinGradlePlugin" }
114126

115127
[bundles]
116128
media3 = ["media3-cast", "media3-common", "media3-datasource-okhttp", "media3-exoplayer", "media3-exoplayer-dash", "media3-exoplayer-hls", "media3-session", "media3-ui"]
117-
nextlibMedia3 = ["nextlib-media3ext", "nextlib-mediainfo"]
118129
navigationKtx = ["navigation-ui-ktx", "navigation-fragment-ktx"]
130+
nextlibMedia3 = ["nextlib-media3ext", "nextlib-mediainfo"]

gradle/wrapper/gradle-wrapper.jar

-8.66 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
2-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
47
zipStorePath=wrapper/dists
5-
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)