Skip to content

Commit

Permalink
chore: preparing for release
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Oct 1, 2024
1 parent eba1c1a commit 5aa4152
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 45 deletions.
48 changes: 9 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
buildscript {
repositories {
maven { url "https://oss.sonatype.org" }
maven { url "https://plugins.gradle.org/m2/" }
gradlePluginPortal()
mavenCentral()
mavenLocal()
}
dependencies {
classpath 'se.bjurr.gitchangelog:git-changelog-lib:1.175.2'
classpath "org.wiremock.tools.gradle:gradle-wiremock-extension-plugins:latest-SNAPSHOT"
classpath "se.bjurr.gradle:java-convention-gradle-plugin:latest-SNAPSHOT"
classpath "se.bjurr.gradle:update-versions-gradle-plugin:latest-SNAPSHOT"
classpath "se.bjurr.gradle.conventional-release:se.bjurr.gradle.conventional-release.gradle.plugin:0.1.15"
classpath "se.bjurr.gradle.java-convention:se.bjurr.gradle.java-convention.gradle.plugin:0.1.2"
classpath "se.bjurr.gradle.update-versions:se.bjurr.gradle.update-versions.gradle.plugin:0.1.6"
}
}

apply plugin: 'project-report'
apply plugin: 'org.wiremock.tools.gradle.wiremock-extension-convention'
apply plugin: "se.bjurr.gradle.conventional-release"
apply plugin: "project-report"

allprojects {
apply plugin: 'se.bjurr.gradle.java-convention'
apply plugin: 'se.bjurr.gradle.update-versions'
apply plugin: "se.bjurr.gradle.java-convention"
apply plugin: "se.bjurr.gradle.update-versions"
apply plugin: "java-library"

dependencies {
testImplementation "org.springframework.boot:spring-boot-starter-test:3.3.4"
Expand Down Expand Up @@ -46,31 +44,3 @@ project('wiremock-spring-boot-example', {
testImplementation 'io.rest-assured:rest-assured:5.5.0'
}
})

def bumpVersionTo(version) {
def propertyFile = new File("$projectDir/gradle.properties")
def gradleProps = new Properties()
propertyFile.withReader { gradleProps.load(it) }
def currentVersion = gradleProps.getProperty("version")
if (currentVersion == version) {
logger.lifecycle("Version not changed (${currentVersion})")
} else {
logger.lifecycle("Version changed (${currentVersion} -> ${version})")
gradleProps.setProperty('version', version)
propertyFile.withWriter { gradleProps.store(it, null) }
}
}

task setConventionalVersion() {
doFirst {
def nextVersion = se.bjurr.gitchangelog.api.GitChangelogApi.gitChangelogApiBuilder()
.withFromRepo(file('.'))
.withSemanticMajorVersionPattern("^[Bb]reak")
.withSemanticMinorVersionPattern("^[Ff]eat")
.getNextSemanticVersion()
.getVersion();
def nextSnapshot = "${nextVersion}-SNAPSHOT"
bumpVersionTo(nextSnapshot)
}
}
build.dependsOn setConventionalVersion
15 changes: 9 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#Wed Sep 25 18:22:00 CEST 2024
baseArtifact=wiremock-spring-boot
developer.id=tomasbjerre
githubRepo=wiremock-spring-boot
description=WireMock integration for Spring Boot.
developer.name=Tomas Bjerre
developer.email=[email protected]
version=3.0.0-SNAPSHOT
group=org.wiremock.spring
sourceCompatibility=17
targetCompatibility=17
useShadowJar=false
website=https://github.com/wiremock/wiremock-spring-boot
vcsUrl=https://github.com/wiremock/wiremock-spring-boot
licenseName=MIT
nexusUsernameEnvOrProp=OSSRH_USERNAME
nexusPasswordEnvOrProp=OSSRH_TOKEN
signingKeyEnvOrProp=OSSRH_GPG_SECRET_KEY
signingPasswordEnvOrProp=OSSRH_GPG_SECRET_KEY_PASSWORD
tags=wiremock,springboot

0 comments on commit 5aa4152

Please sign in to comment.