Refactor Gradle build to declare the type of release (e.g. snapshot, milestone, GA release) using the Spring Build Conventions, io.spring.gradle.convention.Utils class.

This commit is contained in:
John Blum
2022-03-23 18:28:05 -07:00
parent c3db79019e
commit 4b255b9b65

View File

@@ -1,9 +1,6 @@
import io.spring.gradle.convention.Utils
buildscript {
ext {
snapshotBuild = version.endsWith('SNAPSHOT')
releaseBuild = version.endsWith('RELEASE')
milestoneBuild = !(releaseBuild || snapshotBuild)
}
repositories {
mavenCentral()
gradlePluginPortal()
@@ -54,12 +51,19 @@ subprojects {
description = 'Spring Session for Apache Geode'
// Define dependency version override Gradle Project extension properties.
//ext['groovy.version'] = "$groovyVersion"
//ext['spring.version'] = "$springVersion"
//ext['spring-framework.version'] = "$springVersion"
//ext['spring-data-bom.version'] = "$springDataBomVersion"
//ext['spring-session-bom.version'] = "$springSessionBomVersion"
// Define Gradle build in terms of the type of release (e.g. snapshot, milestone or GA release).
ext.snapshotBuild = Utils.isSnapshot(project)
ext.milestoneBuild = Utils.isMilestone(project)
ext.releaseBuild = Utils.isRelease(project)
// Configure the Spring NoHTTP Gradle Plugin.
nohttp {
source.exclude "buildSrc/build/**"
}