Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gradle, agp and coroutines libraries. Add check dependencies v… #15

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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