Skip to content

Commit

Permalink
Enabled automated releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Szczepan Faber committed Mar 22, 2021
1 parent 1968f34 commit 452e059
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
26 changes: 21 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
buildscript {
repositories {
mavenLocal() // for local testing
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.shipkit:shipkit-changelog:1.+"
classpath "org.shipkit:shipkit-auto-version:1.+"
}
}

plugins {
id "org.shipkit.shipkit-auto-version" version "1.1.1"
id "org.shipkit.shipkit-changelog" version "1.1.10"
id "org.shipkit.shipkit-github-release" version "1.1.10"
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
}

//TODO: change java packages to "org.mockito.kotlin"
apply plugin: "org.shipkit.shipkit-auto-version"
apply plugin: "org.shipkit.shipkit-changelog"
apply plugin: "org.shipkit.shipkit-github-release"

group = 'org.mockito.kotlin'

tasks.named("generateChangelog") {
previousRevision = project.ext.'shipkit-auto-version.previous-tag'
githubToken = System.getenv("GITHUB_TOKEN")
repository = "mockito/mockito-kotlin"
releaseTag = project.version
}

tasks.named("githubRelease") {
Expand All @@ -21,12 +33,16 @@ tasks.named("githubRelease") {
changelog = genTask.outputFile
githubToken = System.getenv("GITHUB_TOKEN")
newTagRevision = System.getenv("GITHUB_SHA")
releaseTag = project.version
}

nexusPublishing {
repositories {
if (System.getenv("NEXUS_TOKEN_PWD")) {
sonatype {
sonatype { // Publishing to: https://s01.oss.sonatype.org (faster instance)
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")

username = System.getenv("NEXUS_TOKEN_USER")
password = System.getenv("NEXUS_TOKEN_PWD")
}
Expand Down
3 changes: 2 additions & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Version of the produced binaries.
# The version is inferred by shipkit-auto-version Gradle plugin (https://github.com/shipkit/shipkit-auto-version)
version=2.3.0
version=2.2.*
tagPrefix=

0 comments on commit 452e059

Please sign in to comment.