aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle54
1 files changed, 54 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..3e55fa8
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,54 @@
+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 "io.github.gradle-nexus.publish-plugin" version "1.0.0"
+}
+
+apply plugin: "org.shipkit.shipkit-auto-version"
+apply plugin: "org.shipkit.shipkit-changelog"
+apply plugin: "org.shipkit.shipkit-github-release"
+
+allprojects {
+ 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") {
+ def genTask = tasks.named("generateChangelog").get()
+ dependsOn genTask
+ repository = genTask.repository
+ changelog = genTask.outputFile
+ githubToken = System.getenv("GITHUB_TOKEN")
+ newTagRevision = System.getenv("GITHUB_SHA")
+ releaseTag = project.version
+ releaseName = project.version
+}
+
+nexusPublishing {
+ repositories {
+ if (System.getenv("NEXUS_TOKEN_PWD")) {
+ 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")
+ }
+ }
+ }
+}