Skip to content

Commit 5bc9584

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

File tree

11 files changed

+336
-208
lines changed

11 files changed

+336
-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: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,52 @@
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" }
36
appcompat = "1.7.1"
4-
biometric = "1.4.0-alpha04"
5-
buildkonfigGradlePlugin = "0.15.2"
6-
coil = "3.1.0"
7+
biometric = { require = "1.4.0-alpha04" }
8+
buildkonfigGradlePlugin = "0.17.1"
9+
coil = { strictly = "[3.1, 3.3[" } # do not update above 3.2, it's tied to "kotlinGradlePlugin" version
710
colorpicker = "6b46b49bd5"
8-
conscryptAndroid = "2.5.2"
11+
conscryptAndroid = { strictly = "2.5.2" } # 2.5.3+ crashes everything for everyone.
912
constraintlayout = "2.2.1"
1013
coreKtx = "1.16.0"
1114
desugar_jdk_libs_nio = "2.1.5"
1215
dokkaGradlePlugin = "2.0.0"
13-
espressoCore = "3.6.1"
16+
espressoCore = "3.7.0"
1417
fuzzywuzzy = "1.4.0"
15-
gradle = "8.9.3"
16-
jacksonModuleKotlin = "2.13.1"
17-
json = "20250107"
18+
gradleVersionsPlugin = "0.52.0"
19+
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.
20+
json = "20250517"
1821
junit = "4.13.2"
19-
junitKtx = "1.2.1"
20-
junitVersion = "1.2.1"
22+
junitKtx = "1.3.0"
23+
junitVersion = "1.3.0"
2124
juniversalchardet = "2.5.0"
22-
kotlinGradlePluginVersion = "2.1.10"
23-
kotlinxCoroutinesCore = "1.10.1"
24-
lifecycleLivedataKtx = "2.8.7"
25-
lifecycleViewmodelKtx = "2.8.7"
25+
kotlinGradlePlugin = { strictly = "[2.1, 2.2[" } # do not upgrade above 2.1, it's tied to "androidGradle" version
26+
kotlinxCoroutinesCore = "1.10.2"
27+
lifecycleLivedataKtx = "2.9.2"
28+
lifecycleViewmodelKtx = "2.9.2"
2629
material = "1.12.0"
27-
media3 = "1.6.1"
28-
navigationKtx = "2.8.9"
29-
newpipeextractor = "v0.24.6"
30+
media3 = "1.8.0"
31+
navigationKtx = "2.9.3"
32+
newpipeextractor = "v0.24.8"
3033
nextlibMedia3 = "0.8.4"
3134
nicehttp = "0.4.13"
3235
overlappingpanels = "0.1.5"
3336
paletteKtx = "1.0.0"
3437
preferenceKtx = "1.2.1"
3538
previewseekbarMedia3 = "1.1.1.0"
36-
qrcodeKotlin = "4.3.0"
39+
qrcodeKotlin = "4.5.0"
3740
rhino = "1.8.0"
3841
safefile = "0.0.8"
3942
shimmer = "0.5.0"
4043
swiperefreshlayout = "1.1.0"
41-
tmdbJava = "2.11.0"
44+
tmdbJava = "2.12.0"
4245
torrentserver = "7861970e038b35cd8c6918384e49caf26903e09e"
43-
tvprovider = "1.0.0"
46+
tvprovider = "1.1.0"
4447
video = "1.0.0"
45-
workRuntime = "2.10.0"
46-
workRuntimeKtx = "2.10.0"
48+
workRuntime = "2.10.3"
49+
workRuntimeKtx = "2.10.3"
4750

4851
jvmTarget = "1.8"
4952
minSdk = "21"
@@ -53,34 +56,34 @@ targetSdk = "35"
5356
[libraries]
5457
acra-core = { module = "ch.acra:acra-core", version.ref = "acraCore" }
5558
acra-toast = { module = "ch.acra:acra-toast", version.ref = "acraCore" }
59+
android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" }
5660
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
5761
biometric = { module = "androidx.biometric:biometric", version.ref = "biometric" }
58-
buildkonfig-gradle-plugin = { module = "com.codingfeline.buildkonfig:buildkonfig-gradle-plugin", version.ref = "buildkonfigGradlePlugin" }
5962
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
6063
coil-network-okhttp = { module = "io.coil-kt.coil3:coil-network-okhttp", version.ref = "coil" }
6164
colorpicker = { module = "com.github.recloudstream:color-picker-android", version.ref = "colorpicker" }
6265
conscrypt-android = { module = "org.conscrypt:conscrypt-android", version.ref = "conscryptAndroid" }
6366
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
6467
core = { module = "androidx.test:core" }
6568
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
69+
databinding = { module = "androidx.databinding:viewbinding", version.ref = "androidGradlePlugin" }
6670
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" }
6871
espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" }
6972
ext-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
7073
fuzzywuzzy = { module = "me.xdrop:fuzzywuzzy", version.ref = "fuzzywuzzy" }
71-
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
7274
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" }
7475
json = { module = "org.json:json", version.ref = "json" }
7576
junit = { module = "junit:junit", version.ref = "junit" }
7677
junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "junitKtx" }
7778
juniversalchardet = { module = "com.github.albfernandez:juniversalchardet", version.ref = "juniversalchardet" }
79+
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinGradlePlugin" }
7880
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" }
7981
lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
8082
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
8183
material = { module = "com.google.android.material:material", version.ref = "material" }
8284
media3-cast = { module = "androidx.media3:media3-cast", version.ref = "media3" }
8385
media3-common = { module = "androidx.media3:media3-common", version.ref = "media3" }
86+
media3-container = { module = "androidx.media3:media3-container ", version.ref = "media3" }
8487
media3-datasource-okhttp = { module = "androidx.media3:media3-datasource-okhttp", version.ref = "media3" }
8588
media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "media3" }
8689
media3-exoplayer-dash = { module = "androidx.media3:media3-exoplayer-dash", version.ref = "media3" }
@@ -98,8 +101,8 @@ palette-ktx = { module = "androidx.palette:palette-ktx", version.ref = "paletteK
98101
preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" }
99102
previewseekbar-media3 = { module = "com.github.rubensousa:previewseekbar-media3", version.ref = "previewseekbarMedia3" }
100103
qrcode-kotlin = { module = "io.github.g0dkar:qrcode-kotlin", version.ref = "qrcodeKotlin" }
101-
rhino = { module = "org.mozilla:rhino", version.ref = "rhino" }
102104
quickjs = { module = "app.cash.quickjs:quickjs-android", version = "0.9.2" }
105+
rhino = { module = "org.mozilla:rhino", version.ref = "rhino" }
103106
safefile = { module = "com.github.LagradOst:SafeFile", version.ref = "safefile" }
104107
shimmer = { module = "com.facebook.shimmer:shimmer", version.ref = "shimmer" }
105108
swiperefreshlayout = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version.ref = "swiperefreshlayout" }
@@ -111,8 +114,16 @@ work-runtime = { module = "androidx.work:work-runtime", version.ref = "workRunti
111114
work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workRuntimeKtx" }
112115

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

115126
[bundles]
116127
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"]
118128
navigationKtx = ["navigation-ui-ktx", "navigation-fragment-ktx"]
129+
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)