Skip to content

Commit

Permalink
chore:update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Apr 2, 2024
1 parent 725395f commit da46026
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
27 changes: 20 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML

fun properties(key: String) = providers.gradleProperty(key)
fun environment(key: String) = providers.environmentVariable(key)


plugins {
id("java") // Java support
alias(libs.plugins.kotlin) // Kotlin support
Expand Down Expand Up @@ -133,13 +135,24 @@ tasks {
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
channels = properties("pluginVersion").map { listOf(it.split('-').getOrElse(1) { "default" }.split('.')[0]) }
}
}

dependencyUpdates {
revision = "release"
checkForGradleUpdate = true
outputFormatter = "plain"
outputDir = "build/dependencyUpdates"
reportfileName = "report"
}
apply(plugin = "com.github.ben-manes.versions")

fun String.isNonStable(): Boolean {
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { uppercase().contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(this)
return isStable.not()
}

tasks.withType<DependencyUpdatesTask> {
rejectVersionIf {
candidate.version.isNonStable()
}
revision = "release"
checkForGradleUpdate = true
outputFormatter = "plain"
outputDir = "build/dependencyUpdates"
reportfileName = "report"
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ platformVersion=2023.3.5
platformPlugins=org.jetbrains.plugins.github

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion=8.6
gradleVersion=8.7

# Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
# suppress inspection "UnusedProperty"
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kotlinxCoroutines = "1.8.0"
# plugins
kotlin = "1.9.23"
changelog = "2.2.0"
gradleIntelliJPlugin = "1.17.2"
gradleIntelliJPlugin = "1.17.3"
gradleVersionsPlugin = "0.51.0"
kover = "0.7.6"
dokka = "1.8.10"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit da46026

Please sign in to comment.