Skip to content

Commit

Permalink
Update gradle, agp and coroutines libraries. Add check dependencies v…
Browse files Browse the repository at this point in the history
…ersions plugin (#15)
  • Loading branch information
VladislavSumin authored Jan 2, 2025
1 parent 0b996e0 commit fe0ff00
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
1 change: 1 addition & 0 deletions build-scripts/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ dependencies {
implementation(vsCoreLibs.gradlePlugins.kotlin.core)
implementation(vsCoreLibs.gradlePlugins.android)
implementation(vsCoreLibs.gradlePlugins.detekt)
implementation(vsCoreLibs.gradlePlugins.checkUpdates)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package ru.vladislavsumin.convention.analyze

/**
* Базовая настройка плагина для проверки версий библиотек
*/

plugins {
id("com.github.ben-manes.versions")
}

tasks.dependencyUpdates.configure {
fun isNonStable(version: String): Boolean {
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(version)
return !isStable
}
rejectVersionIf {
isNonStable(candidate.version) && !isNonStable(currentVersion)
}
}
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
plugins {
id("ru.vladislavsumin.convention.analyze.detekt-all")
id("ru.vladislavsumin.convention.analyze.check-updates")
}
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Dec 13 23:10:21 MSK 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 4 additions & 2 deletions libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

# Kotlin
kotlin-core = "2.1.0"
kotlin-coroutines = "1.9.0"
kotlin-coroutines = "1.10.1"
kotlin-serialization = "1.7.3"

gradlePlugins-android = "8.5.2"
gradlePlugins-android = "8.7.3"
gradlePlugins-detekt = "1.23.7"
gradlePlugins-checkUpdates = "0.51.0"
decompose = "3.2.2"

[libraries]
Expand All @@ -15,6 +16,7 @@ decompose = "3.2.2"
gradlePlugins-kotlin-core = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin-core" }
gradlePlugins-android = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugins-android" }
gradlePlugins-detekt = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "gradlePlugins-detekt" }
gradlePlugins-checkUpdates = { module = "com.github.ben-manes:gradle-versions-plugin", version.ref = "gradlePlugins-checkUpdates" }

# Kotlin
kotlin-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlin-coroutines" }
Expand Down

0 comments on commit fe0ff00

Please sign in to comment.