From 5aa41522268b732a5c6951a09f333b7a4045ccb5 Mon Sep 17 00:00:00 2001 From: Tomas Bjerre Date: Tue, 1 Oct 2024 18:56:22 +0200 Subject: [PATCH] chore: preparing for release --- build.gradle | 48 +++++++++-------------------------------------- gradle.properties | 15 +++++++++------ 2 files changed, 18 insertions(+), 45 deletions(-) diff --git a/build.gradle b/build.gradle index 1c1bfac..54b1e77 100644 --- a/build.gradle +++ b/build.gradle @@ -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" @@ -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 diff --git a/gradle.properties b/gradle.properties index 832d37b..d8fa88c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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=tomas.bjerre85@gmail.com 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 \ No newline at end of file