diff --git a/build.gradle b/build.gradle index bf4c14b..e223b6a 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,11 @@ plugins { id 'com.github.ben-manes.versions' version '0.39.0' } -version = '0.1' - -allprojects { group = 'nl.sikken.bertrik' } +def isNonStable = { String version -> + def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) } + def regex = /^[0-9,.v-]+(-r)?$/ + return !stableKeyword && !(version ==~ regex) +} // Define all library dependencies in one file for clarity apply from:'dependencies.gradle' @@ -23,11 +25,12 @@ subprojects { mavenCentral() } - spotbugsMain { - reports { - html { - enabled = true - } + spotbugsMain { reports {html { enabled = true } } } + + // Reject all non stable versions + tasks.named("dependencyUpdates").configure { + rejectVersionIf { + isNonStable(it.candidate.version) } } diff --git a/dependencies.gradle b/dependencies.gradle index 5d44816..92299b1 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -8,14 +8,14 @@ ext { libraries = [:] } -libraries.slf4j = 'org.slf4j:slf4j-api:1.7.26' -libraries.slf4jlog4j = 'org.slf4j:slf4j-log4j12:1.7.26' +libraries.slf4j = 'org.slf4j:slf4j-api:1.7.32' +libraries.slf4jlog4j = 'org.slf4j:slf4j-log4j12:1.7.32' -libraries.jaxb_api = 'javax.xml.bind:jaxb-api:2.3.0' +libraries.jaxb_api = 'javax.xml.bind:jaxb-api:2.3.1' libraries.jackson = [ - 'com.fasterxml.jackson.core:jackson-databind:2.12.3', - 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.12.3' + 'com.fasterxml.jackson.core:jackson-databind:2.13.0', + 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.0' ] libraries.retrofit = [ @@ -32,5 +32,5 @@ libraries.junit = 'junit:junit:4.13.2' libraries.mockito = 'org.mockito:mockito-core:3.12.4' // check libraries -libraries.spotbugs_annotations = 'com.github.spotbugs:spotbugs-annotations:4.4.0' +libraries.spotbugs_annotations = 'com.github.spotbugs:spotbugs-annotations:4.4.1'