diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c2380033b..e27811689 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,5 +1,3 @@ -import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask -import com.github.benmanes.gradle.versions.updates.gradle.GradleReleaseChannel import io.gitlab.arturbosch.detekt.Detekt import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -10,7 +8,6 @@ plugins { alias(libs.plugins.kotlin.parcelize) alias(libs.plugins.detekt) alias(libs.plugins.android.junit5) - alias(libs.plugins.dependencyupdates) } // Apply workaround @@ -211,24 +208,6 @@ tasks { } } - // Configure dependency updates task - withType { - gradleReleaseChannel = GradleReleaseChannel.CURRENT.id - rejectVersionIf { - val currentType = classifyVersion(currentVersion) - val candidateType = classifyVersion(candidate.version) - - when (candidateType) { - // Always accept stable updates - VersionType.STABLE -> true - // Accept milestone updates for current milestone and unstable - VersionType.MILESTONE -> currentType != VersionType.STABLE - // Only accept unstable for current unstable - VersionType.UNSTABLE -> currentType == VersionType.UNSTABLE - }.not() - } - } - register("versionTxt") { val path = buildDir.resolve("version.txt") diff --git a/buildSrc/src/main/kotlin/VersionUtils.kt b/buildSrc/src/main/kotlin/VersionUtils.kt index 2e5163829..8c02a371b 100644 --- a/buildSrc/src/main/kotlin/VersionUtils.kt +++ b/buildSrc/src/main/kotlin/VersionUtils.kt @@ -67,18 +67,3 @@ fun getVersionCode(versionName: String): Int { return code } - -enum class VersionType { - STABLE, MILESTONE, UNSTABLE -} - -fun classifyVersion(version: String): VersionType { - val normalizedVersion = version.toLowerCase(Locale.ROOT) - return when { - normalizedVersion.containsAny(listOf("alpha", "beta", "dev")) -> VersionType.UNSTABLE - normalizedVersion.containsAny(listOf("rc", "m")) -> VersionType.MILESTONE - else -> VersionType.STABLE - } -} - -fun String.containsAny(strings: Iterable): Boolean = strings.any { contains(it) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4433fb5f9..74697dda2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,6 @@ kotlin = "1.8.21" kotlin-ksp = "1.8.21-1.0.11" detekt = "1.22.0" android-junit5 = "1.9.3.0" -dependencyupdates = "0.46.0" # KotlinX coroutines = "1.7.1" @@ -70,7 +69,6 @@ kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = kotlin-ksp = { id = "com.google.devtools.ksp", version.ref = "kotlin-ksp" } android-junit5 = { id = "de.mannodermaus.android-junit5", version.ref = "android-junit5" } detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } -dependencyupdates = { id = "com.github.ben-manes.versions", version.ref = "dependencyupdates" } [libraries] # KotlinX