* Move `nextDevelopmentVersion` Gradle task to the `spring-project-init.gradle` * Checkout common repo to the `build` dir which is then cleaned by Gradle
47 lines
2.0 KiB
Groovy
47 lines
2.0 KiB
Groovy
gradle.projectsLoaded {
|
|
rootProject {
|
|
// JFrog's build-info-extractor-gradle adds Gradle init script which does `apply plugin: ArtifactoryPlugin`
|
|
artifactory {
|
|
publish {
|
|
defaults {
|
|
def zipArtifactProps =
|
|
['zip.name': 'spring-integration-aws',
|
|
'zip.displayname': 'Spring Integration Aws',
|
|
'zip.deployed': 'false']
|
|
properties {
|
|
mavenJava zipArtifactProps, '*:*:*:*@zip'
|
|
mavenJava 'zip.type': 'docs', '*:*:*:docs@zip'
|
|
mavenJava 'zip.type': 'dist', '*:*:*:dist@zip'
|
|
}
|
|
|
|
publications('mavenJava')
|
|
}
|
|
forkCount = 10
|
|
}
|
|
clientConfig.setConnectionRetries(4)
|
|
}
|
|
|
|
// No need to have this task in project: only when we perform GHA
|
|
tasks.register('nextDevelopmentVersion') {
|
|
doLast {
|
|
if (!project.version.endsWith('-SNAPSHOT')) {
|
|
String nextDevelopmentVersion
|
|
if (project.version.contains('-M') || project.version.contains('-RC')) {
|
|
nextDevelopmentVersion = project.version - ~/(M|RC)\d+/ + 'SNAPSHOT'
|
|
}
|
|
else {
|
|
def versionParts = project.version.tokenize('.')
|
|
def major = versionParts[0]
|
|
def minor = versionParts[1]
|
|
def patch = versionParts[2] as int
|
|
nextDevelopmentVersion = major + '.' + minor + '.' + (++patch)+ '-SNAPSHOT'
|
|
}
|
|
|
|
def gradleProperties = file('gradle.properties')
|
|
def newProps = gradleProperties.text.replace(project.version, nextDevelopmentVersion)
|
|
gradleProperties.text = newProps
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |