From 75a765959c6c20f8d2b92bf9264b0b7d7e66f007 Mon Sep 17 00:00:00 2001 From: Szczepan Faber Date: Mon, 17 May 2021 10:49:12 -0500 Subject: [PATCH] Enabled automated changelog - replaced axion Gradle plugin with Shipkit plugin. The plugin controls the version and provides information about 'previous' version which is needed for correct generation of the backlog --- README.md | 5 ++--- build.gradle | 18 +----------------- gradle/shipkit.gradle | 13 +++++++------ 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index f24c425079..fbfdc894a2 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,8 @@ reduce risk, and improve code health, while paying the maintainers of the exact Mockito publishes every change as a `-SNAPSHOT` version to a public Sonatype repository. Roughly once a month, we publish a new minor or patch version to Maven Central. For release automation we use Shipkit -library (http://shipkit.org), Gradle Nexus [Publish Plugin](https://github.com/gradle-nexus/publish-plugin), and -Allegro's [Axion Release Plugin](https://github.com/allegro/axion-release-plugin). Fully automated releases are awesome, -and you should do that for your libraries, too! +library (http://shipkit.org), Gradle Nexus [Publish Plugin](https://github.com/gradle-nexus/publish-plugin). +Fully automated releases are awesome, and you should do that for your libraries, too! See the [latest release notes](https://github.com/mockito/mockito/releases/) and [latest documentation](https://javadoc.io/page/org.mockito/mockito-core/latest/org/mockito/Mockito.html). Docs in javadoc.io are available 24h after release. Read also diff --git a/build.gradle b/build.gradle index 4d83088a69..80c8f63f06 100644 --- a/build.gradle +++ b/build.gradle @@ -10,10 +10,9 @@ buildscript { classpath "io.github.gradle-nexus:publish-plugin:1.1.0" classpath 'org.shipkit:shipkit-changelog:1.1.15' + classpath 'org.shipkit:shipkit-auto-version:1.1.11' classpath 'com.google.googlejavaformat:google-java-format:1.10.0' - - classpath 'pl.allegro.tech.build:axion-release-plugin:1.13.2' } } @@ -25,21 +24,6 @@ plugins { id 'ru.vyarus.animalsniffer' version '1.5.2' } -apply plugin: "pl.allegro.tech.build.axion-release" - -scmVersion { - tag { - prefix = 'v' - versionSeparator = '' - } -} - -allprojects { - version = scmVersion.version -} - -println "Building version $version" - description = 'Mockito mock objects library core API and implementation' apply plugin: 'base' diff --git a/gradle/shipkit.gradle b/gradle/shipkit.gradle index 169f014ec8..add74ce6a9 100644 --- a/gradle/shipkit.gradle +++ b/gradle/shipkit.gradle @@ -1,10 +1,11 @@ -apply plugin: "org.shipkit.shipkit-changelog" -apply plugin: "org.shipkit.shipkit-github-release" +apply plugin: 'org.shipkit.shipkit-auto-version' +apply plugin: 'org.shipkit.shipkit-changelog' +apply plugin: 'org.shipkit.shipkit-github-release' -tasks.named("generateChangelog") { - previousRevision = 'HEAD' //TODO, this will generate empty release notes - githubToken = System.getenv("GITHUB_TOKEN") - repository = "mockito/mockito" +tasks.named('generateChangelog') { + previousRevision = project.ext.'shipkit-auto-version.previous-tag' + githubToken = System.getenv('GITHUB_TOKEN') + repository = 'mockito/mockito' } tasks.named("githubRelease") {