aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Faber <szczepiq@gmail.com>2021-01-27 10:39:34 -0600
committerGitHub <noreply@github.com>2021-01-27 10:39:34 -0600
commit6232b437fabcfdaeb5b2d1c209107128f2e2da2f (patch)
tree56004a9decdeac4a6a5854f8fc2fc9cab01e0e59
parentb8f480fd5594d037a085da2d857bdd5597a56bdf (diff)
parentbc9618fa08ef6f36c68e20ac02293851650149ad (diff)
downloadmockito-kotlin-6232b437fabcfdaeb5b2d1c209107128f2e2da2f.tar.gz
Merge pull request #402 from mockito/sf
Added CI + Bintray releases
-rw-r--r--.github/workflows/ci.yml106
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml39
-rw-r--r--build.gradle29
-rw-r--r--gradle/publishing.gradle101
-rw-r--r--gradle/scripts/tagging.gradle22
-rw-r--r--gradle/wrapper/gradle-wrapper.jarbin54731 -> 59203 bytes
-rw-r--r--gradle/wrapper/gradle-wrapper.properties3
-rwxr-xr-xgradlew53
-rw-r--r--gradlew.bat43
-rw-r--r--mockito-kotlin/build.gradle5
-rw-r--r--publishing.gradle63
-rw-r--r--tests/build.gradle3
-rw-r--r--version.properties3
14 files changed, 289 insertions, 182 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..2328c48
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,106 @@
+#
+# CI build that assembles artifacts and runs tests.
+# If validation is successful this workflow releases from the main dev branch.
+#
+# - skipping CI: add [skip ci] to the commit message
+# - skipping release: add [skip release] to the commit message
+#
+name: CI
+
+on:
+ push:
+ branches:
+ - main
+ tags-ignore:
+ - v* # release tags are automatically generated after a successful CI build, no need to run CI against them
+ pull_request:
+ branches:
+ - main
+
+jobs:
+
+ #
+ # SINGLE-JOB
+ #
+ verify:
+ runs-on: ubuntu-latest
+ if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
+
+ steps:
+
+ - name: 1. Check out code
+ uses: actions/checkout@v2 # https://github.com/actions/checkout
+
+ - name: 2. Set up Java 8
+ uses: actions/setup-java@v1 # https://github.com/actions/setup-java
+ with:
+ java-version: 8
+
+ - name: 3. Validate Gradle wrapper
+ uses: gradle/wrapper-validation-action@v1 # https://github.com/gradle/wrapper-validation-action
+
+ #
+ # Main build job
+ #
+ build:
+ needs: [verify]
+ runs-on: ubuntu-latest
+
+ # Definition of the build matrix
+ strategy:
+ matrix:
+ mock-maker: ['mock-maker-default', 'mock-maker-inline']
+ kotlin: ['1.3.50', '1.4.21']
+ # Note that the old Travis CI referenced other Kotlin versions: '1.0.7', '1.1.61', '1.2.50'
+ # However, those versions of Kotlin don't work with latest Gradle
+
+ steps:
+
+ - name: 1. Check out code
+ uses: actions/checkout@v2 # https://github.com/actions/checkout
+
+ - name: 2. Set up Java 8
+ uses: actions/setup-java@v1 # https://github.com/actions/setup-java
+ with:
+ java-version: 8
+
+ - name: 3. Build with Kotlin ${{ matrix.kotlin }} and mock-maker ${{ matrix.mock-maker }}
+ run: |
+ ops/mockMakerInline.sh
+ ./gradlew build bintrayUpload -PbintrayDryRun
+ env:
+ KOTLIN_VERSION: ${{ matrix.kotlin }}
+ MOCK_MAKER: ${{ matrix.mock-maker }}
+
+ #
+ # Release job, only for pushes to the main development branch
+ #
+ release:
+ runs-on: ubuntu-latest
+ needs: [build] # build job must pass before we can release
+
+ if: github.event_name == 'push'
+ && github.ref == 'refs/heads/main'
+ && github.repository == 'mockito/mockito-kotlin'
+ && !contains(toJSON(github.event.commits.*.message), '[skip release]')
+
+ steps:
+
+ - name: Check out code
+ uses: actions/checkout@v2 # https://github.com/actions/checkout
+ with:
+ fetch-depth: '0' # https://github.com/shipkit/shipkit-changelog#fetch-depth-on-ci
+
+ - name: Set up Java 8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 8
+
+ - name: Build and publish to Bintray/MavenCentral
+ run: ./gradlew tasks # TODO, in progress: bintrayUpload githubRelease
+ env:
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+# BINTRAY_API_KEY: ${{secrets.BINTRAY_API_KEY}}
+# NEXUS_TOKEN_USER: ${{secrets.NEXUS_TOKEN_USER}}
+# NEXUS_TOKEN_PWD: ${{secrets.NEXUS_TOKEN_PWD}}
+
diff --git a/.gitignore b/.gitignore
index bfee7ef..f9e1291 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
.gradle
build/
out/
+repo
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 925d366..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-sudo: false
-
-language: java
-
-matrix:
- include:
- - jdk: openjdk8
- env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.0.7
- - jdk: openjdk8
- env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.1.61
- - jdk: openjdk8
- env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.2.50
- - jdk: openjdk8
- env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.3.50
- - jdk: openjdk8
- env: TERM=dumb KOTLIN_VERSION=1.0.7
- - jdk: openjdk8
- env: TERM=dumb KOTLIN_VERSION=1.1.61
- - jdk: openjdk8
- env: TERM=dumb KOTLIN_VERSION=1.2.50
- - jdk: openjdk8
- env: TERM=dumb KOTLIN_VERSION=1.3.50
-
-
-env:
- matrix:
- - TERM=dumb
-
-install:
- - true
-
-script:
- - ops/mockMakerInline.sh
- - ./gradlew clean
- - ./gradlew assemble
- - ./gradlew test -i
-
-notifications:
- email: false
diff --git a/build.gradle b/build.gradle
index 40ac3cd..3a07a83 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,18 +1,21 @@
-buildscript {
- repositories {
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
- dependencies {
- classpath "io.spring.gradle:spring-bintray-plugin:0.11.1"
- }
+plugins {
+ id "org.shipkit.shipkit-auto-version" version "1.1.1"
+ id "org.shipkit.shipkit-changelog" version "1.1.1"
+ id "org.shipkit.shipkit-github-release" version "1.1.1"
}
-plugins {
- id 'com.github.ben-manes.versions' version '0.20.0'
+tasks.named("generateChangelog") {
+ previousRevision = project.ext.'shipkit-auto-version.previous-tag'
+ githubToken = System.getenv("GITHUB_TOKEN")
+ repository = "mockito/mockito-kotlin"
}
-apply from: 'gradle/scripts/tagging.gradle'
+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")
+}
-println ext.versionName \ No newline at end of file
diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle
new file mode 100644
index 0000000..722f59a
--- /dev/null
+++ b/gradle/publishing.gradle
@@ -0,0 +1,101 @@
+apply plugin: 'maven-publish'
+
+//TODO: update the group to 'org.mockito' ***AND*** change java packages
+group = 'com.nhaarman.mockitokotlin2'
+
+task javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from 'build/javadoc'
+}
+
+task sourceJar(type: Jar) {
+ from sourceSets.main.allSource
+}
+
+publishing {
+ publications {
+ javaLibrary(MavenPublication) {
+ artifactId 'mockito-kotlin'
+
+ from components.java
+
+ artifact sourceJar {
+ classifier "sources"
+ }
+
+ artifact javadocJar
+
+ pom.withXml {
+ def root = asNode()
+ root.appendNode('name', 'Mockito-Kotlin')
+ root.appendNode('description', 'Using Mockito with Kotlin.')
+ root.appendNode('url', 'https://github.com/mockito/mockito-kotlin')
+
+ def scm = root.appendNode('scm')
+ scm.appendNode('url', 'scm:git@github.com:mockito/mockito-kotlin.git')
+
+ def licenses = root.appendNode('licenses')
+ def mitLicense = licenses.appendNode('license')
+ mitLicense.appendNode('name', 'MIT')
+
+ def developers = root.appendNode('developers')
+ def nhaarman = developers.appendNode('developer')
+ nhaarman.appendNode('id', 'nhaarman')
+ nhaarman.appendNode('name', 'Niek Haarman')
+ }
+ }
+ }
+
+ //useful for testing - running "publish" will create artifacts/pom in a local dir
+ repositories { maven { url = "$rootProject.buildDir/repo" } }
+}
+
+clean {
+ delete "$rootProject.buildDir/repo"
+}
+
+// Avoid generation of the module metadata so that we don't have to publish an additional file
+// and keep the build logic simple.
+tasks.withType(GenerateModuleMetadata) {
+ enabled = false
+}
+
+//fleshes out problems with Maven pom generation when building
+tasks.build.dependsOn('publishJavaLibraryPublicationToMavenLocal')
+
+//Bintray Gradle plugin configuration (https://github.com/bintray/gradle-bintray-plugin)
+//Plugin jars are added to the buildscript classpath in the root build.gradle file
+apply plugin: 'com.jfrog.bintray'
+
+bintray {
+ //We need to use some user id here, because the Bintray key is associated with the user
+ //However, any user id is good, so longer the user has necessary privileges to the repository
+ user = 'szczepiq' //https://bintray.com/szczepiq
+ key = System.getenv('BINTRAY_API_KEY')
+ publish = false //can be changed to 'false' for testing
+ dryRun = project.hasProperty('bintrayDryRun')
+
+ publications = ['javaLibrary']
+
+ pkg {
+ repo = 'test' //https://bintray.com/mockito/maven // TODO change to 'maaven' when CI ready
+ userOrg = 'mockito' //https://bintray.com/mockito
+
+ name = 'mockito-kotlin'
+
+ licenses = ['MIT']
+ labels = ['kotlin', 'mockito']
+ vcsUrl = 'https://github.com/mockito/mockito-kotlin.git'
+
+ version {
+ name = project.version
+ vcsTag = "v$project.version"
+
+ mavenCentralSync {
+ sync = false // TODO enable after CI+bintray integration is ready
+ user = System.getenv('NEXUS_TOKEN_USER')
+ password = System.getenv('NEXUS_TOKEN_PWD')
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/gradle/scripts/tagging.gradle b/gradle/scripts/tagging.gradle
deleted file mode 100644
index 907707d..0000000
--- a/gradle/scripts/tagging.gradle
+++ /dev/null
@@ -1,22 +0,0 @@
-new ByteArrayOutputStream().withStream { os ->
-
- exec {
- commandLine 'git', 'describe', '--abbrev=0', '--tags'
- standardOutput = os
- }
-
- String tag = os.toString().trim();
- if (tag.length() == 0) {
- tag = "0.0.0"
- } else if (tag.indexOf('-') != -1 && tag.length() > tag.indexOf('-') + 1 && tag.charAt(tag.indexOf('-') + 1).isDigit()) {
- tag = tag.substring(0, tag.indexOf('-'));
- }
-
- ext.versionName = tag;
-
- if (isRelease == 'false') {
- int lastNumber = Integer.parseInt(tag.substring(tag.size() - 1))
- ext.versionName = tag.substring(0, tag.size() - 1) + (lastNumber + 1) + "-SNAPSHOT";
- }
-}
-
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 6b6ea3a..e708b1c 100644
--- a/gradle/wrapper/gradle-wrapper.jar
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index f2beea1..28ff446 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Mon Oct 29 21:53:52 CET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
diff --git a/gradlew b/gradlew
index cccdd3d..4f906e0 100755
--- a/gradlew
+++ b/gradlew
@@ -1,5 +1,21 @@
#!/usr/bin/env sh
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
##############################################################################
##
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -66,6 +82,7 @@ esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -109,10 +126,11 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
@@ -138,19 +156,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
- i=$((i+1))
+ i=`expr $i + 1`
done
case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
@@ -159,14 +177,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
-APP_ARGS=$(save "$@")
+APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
index e95643d..ac1b06f 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,3 +1,19 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
+if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -35,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-if exist "%JAVA_EXE%" goto init
+if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -45,28 +64,14 @@ echo location of your Java installation.
goto fail
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
diff --git a/mockito-kotlin/build.gradle b/mockito-kotlin/build.gradle
index 7f5bc36..0e44297 100644
--- a/mockito-kotlin/build.gradle
+++ b/mockito-kotlin/build.gradle
@@ -1,5 +1,5 @@
apply plugin: 'kotlin'
-apply from: '../publishing.gradle'
+apply from: '../gradle/publishing.gradle'
apply plugin: 'org.jetbrains.dokka'
buildscript {
@@ -13,8 +13,7 @@ buildscript {
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.17"
- classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
- classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
+ classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5"
}
}
diff --git a/publishing.gradle b/publishing.gradle
deleted file mode 100644
index cb03d87..0000000
--- a/publishing.gradle
+++ /dev/null
@@ -1,63 +0,0 @@
-apply plugin: 'maven-publish'
-apply plugin: "io.spring.bintray"
-
-bintray.bintrayUser = hasProperty('bintray_username') ? bintray_username : System.getenv('BINTRAY_USER')
-bintray.bintrayKey = hasProperty('bintray_key') ? bintray_key : System.getenv('BINTRAY_KEY')
-bintray.repo = 'maven'
-bintray.org = hasProperty('bintray_username') ? bintray_username : System.getenv('BINTRAY_USER')
-bintray.packageName = 'Mockito-Kotlin'
-bintray.publication = 'mavenJava'
-
-bintray.licenses = ['MIT']
-bintray.ossrhUser = hasProperty('sonatype_username') ? sonatype_username : System.getenv('SONATYPE_USERNAME')
-bintray.ossrhPassword = hasProperty('sonatype_password') ? sonatype_password : System.getenv('SONATYPE_PASSWORD')
-bintray.overrideOnUpload = false
-bintray.gpgPassphrase = hasProperty('signing_password') ? signing_password : System.getenv('SIGNING_PASSWORD')
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from 'build/javadoc'
-}
-
-task sourceJar(type: Jar) {
- from sourceSets.main.allSource
-}
-
-group = 'com.nhaarman.mockito-kotlin2'
-version = rootProject.ext.versionName
-
-publishing {
- publications {
- mavenJava(MavenPublication) {
- groupId 'com.nhaarman.mockitokotlin2'
- artifactId 'mockito-kotlin'
-
- from components.java
-
- artifact sourceJar {
- classifier "sources"
- }
-
- artifact javadocJar
-
- pom.withXml {
- def root = asNode()
- root.appendNode('name', 'Mockito-Kotlin')
- root.appendNode('description', 'Using Mockito with Kotlin.')
- root.appendNode('url', 'https://github.com/nhaarman/mockito-kotlin')
-
- def scm = root.appendNode('scm')
- scm.appendNode('url', 'scm:git@github.com:nhaarman/mockito-kotlin.git')
-
- def licenses = root.appendNode('licenses')
- def mitLicense = licenses.appendNode('license')
- mitLicense.appendNode('name', 'MIT')
-
- def developers = root.appendNode('developers')
- def nhaarman = developers.appendNode('developer')
- nhaarman.appendNode('id', 'nhaarman')
- nhaarman.appendNode('name', 'Niek Haarman')
- }
- }
- }
-} \ No newline at end of file
diff --git a/tests/build.gradle b/tests/build.gradle
index cd11001..24ab716 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -1,5 +1,6 @@
buildscript {
ext.kotlin_version = System.getenv("KOTLIN_VERSION") ?: '1.3.50'
+ println "$project uses Kotlin $kotlin_version"
repositories {
mavenCentral()
@@ -18,7 +19,7 @@ repositories {
}
dependencies {
- compile files("${rootProject.projectDir}/mockito-kotlin/build/libs/mockito-kotlin-${rootProject.ext.versionName}.jar")
+ compile files("${rootProject.projectDir}/mockito-kotlin/build/libs/mockito-kotlin-${version}.jar")
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.mockito:mockito-core:2.23.0"
diff --git a/version.properties b/version.properties
new file mode 100644
index 0000000..8285f56
--- /dev/null
+++ b/version.properties
@@ -0,0 +1,3 @@
+# 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