Skip to content

Commit

Permalink
Bump dependency/plugin versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ascheman committed Apr 21, 2024
1 parent 76960b6 commit bbf24ad
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 19 deletions.
26 changes: 24 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ configure(subprojects) {
name = 'myLocalRepositoryForFullIntegrationTests'
//noinspection GrDeprecatedAPIUsage
File baseDir = file(project.parent.buildDir)
url = new File (baseDir, "maven-repo")
url = new File(baseDir, "maven-repo")
}
mavenLocal()
}
Expand All @@ -92,8 +92,30 @@ configure(subprojects) {
}
}

def groovyVersion = libs.groovy.bom.get().version
def groovyVersionMajorMinor = groovyVersion.split('\\.')[0..1] .join('.')

tasks.named("dependencyUpdates").configure {
gradleReleaseChannel = true

resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
if (selection.candidate.version =~ /(alpha|M)/) {
selection.reject('Rejected alpha or milestone version')
} else if (selection.candidate.group == 'org.spockframework') {
def spockGroovyVersion = selection.candidate.version.split('-')[2]
if (spockGroovyVersion != groovyVersionMajorMinor) {
selection.reject("Spock's Groovy version ($spockGroovyVersion) does not match project's Groovy major/minor version ($groovyVersionMajorMinor)")
}
} else if (selection.candidate.group == 'org.codehaus.groovy') {
if (selection.candidate.version != groovyVersion) {
selection.reject("Groovy version is determined by Gradle API (${groovyVersion})")
}
}
}
}
}
}

sonar {
Expand Down Expand Up @@ -121,7 +143,7 @@ tasks.register("integrationTestOnly") {
}
logger.debug "Script output: $result"
File integrationTestDirectory = file(INTEGRATION_TEST_DIRECTORY)
final File testIndex = new File (integrationTestDirectory, "build/reports/index.html")
final File testIndex = new File(integrationTestDirectory, "build/reports/index.html")
assert testIndex.exists()
}
}
Expand Down
29 changes: 15 additions & 14 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
[versions]
groovy-version = "3.0.17"
junit5-version = "5.10.1"
groovy-version = '3.0.17'
junit5-version = '5.10.2'
slf4j-version = '2.0.13'

[libraries]
commons-validator = "commons-validator:commons-validator:1.8.0"
# Use Groovy which corresponds to Gradle version (of hsc build)
groovy-bom = { module = "org.codehaus.groovy:groovy-bom", version.ref = "groovy-version" }
jsoup = "org.jsoup:jsoup:1.17.2"
junit-vintage = { module = "org.junit.vintage:junit-vintage-engine", version.ref = "junit5-version" }
lombok = "org.projectlombok:lombok:1.18.30"
slf4j-api = "org.slf4j:slf4j-api:2.0.11"
slf4j-nop = "org.slf4j:slf4j-nop:2.0.11"
spock = "org.spockframework:spock-bom:2.3-groovy-3.0"
commons-validator = 'commons-validator:commons-validator:1.8.0'
# Use Groovy which corresponds to a Gradle version (of hsc build)
groovy-bom = { module = 'org.codehaus.groovy:groovy-bom', version.ref = 'groovy-version' }
jsoup = 'org.jsoup:jsoup:1.17.2'
junit-vintage = { module = 'org.junit.vintage:junit-vintage-engine', version.ref = 'junit5-version' }
lombok = 'org.projectlombok:lombok:1.18.32'
slf4j-api = { module = 'org.slf4j:slf4j-api', version.ref = 'slf4j-version' }
slf4j-nop = { module = 'org.slf4j:slf4j-nop', version.ref = 'slf4j-version' }
spock = 'org.spockframework:spock-bom:2.3-groovy-3.0'

[plugins]
gradle-versions = { id= "com.github.ben-manes.versions", version = "0.51.0" }
sonar = { id = "org.sonarqube", version = "5.0.0.4638" }
gitProperties = { id = "com.gorylenko.gradle-git-properties", version = "2.4.1" }
gradle-versions = { id= 'com.github.ben-manes.versions', version = '0.51.0' }
sonar = { id = 'org.sonarqube', version = '5.0.0.4638' }
gitProperties = { id = 'com.gorylenko.gradle-git-properties', version = '2.4.1' }

# Copyright Gerd Aschemann and aim42 contributors.
#
Expand Down
3 changes: 0 additions & 3 deletions htmlSanityCheck-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,9 @@ tasks.register('copyResourceImages', Copy) {
processResources {
dependsOn copyResourceImages, generateGitProperties

// duplicatesStrategy = DuplicatesStrategy.INHERIT

exclude '**/*.png'
inputs.property "version", project.version
filter ReplaceTokens, tokens: [version: project.version]
println "after processResources config, version= ${project.version}"
}

/*
Expand Down

0 comments on commit bbf24ad

Please sign in to comment.