Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit 7199cbf

Browse files
committed
Use gradle-versions-plugin to check for dependency updates.
+ This plugin adds the "dependencyUpdates" Gradle task. + Version 0.27.0 is used because it is the last version being compatible with the Gradle version used in the project. + Plugin website: https://github.com/ben-manes/gradle-versions-plugin
1 parent 643885f commit 7199cbf

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ buildscript {
77
}
88
dependencies {
99
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.0.RELEASE")
10+
classpath("com.github.ben-manes:gradle-versions-plugin:0.27.0")
1011
}
1112
}
1213

1314

1415
group = 'opacapi'
1516
version = '1.0-SNAPSHOT'
1617

18+
apply from: 'gradle/gradle-versions.gradle'
1719
apply plugin: 'java'
1820
apply plugin: 'idea'
1921
apply plugin: 'application'

gradle/gradle-versions.gradle

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Gradle Versions Plugin
2+
3+
apply plugin: "com.github.ben-manes.versions"
4+
5+
dependencyUpdates {
6+
7+
def isNonStable = { String version ->
8+
def stableKeyword = ["RELEASE", "FINAL", "GA"].any {
9+
qualifier -> version.toUpperCase().contains(qualifier)
10+
}
11+
def regex = /^[0-9,.v-]+(-r)?$/
12+
return !stableKeyword && !(version ==~ regex)
13+
}
14+
15+
rejectVersionIf {
16+
isNonStable(it.candidate.version)
17+
}
18+
19+
}

0 commit comments

Comments
 (0)