diff --git a/.travis.yml b/.travis.yml index 9b4a49ef..925d3669 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ matrix: - 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.40 + 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 @@ -19,7 +19,7 @@ matrix: - jdk: openjdk8 env: TERM=dumb KOTLIN_VERSION=1.2.50 - jdk: openjdk8 - env: TERM=dumb KOTLIN_VERSION=1.3.40 + env: TERM=dumb KOTLIN_VERSION=1.3.50 env: diff --git a/README.md b/README.md index 871611e8..d8087afe 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,34 @@ fun doAction_doesSomething(){ ``` For more info and samples, see the [Wiki](https://github.com/nhaarman/mockito-kotlin/wiki). + +## Building + +Mockito-Kotlin is built with Gradle. + + - `./gradlew build` builds the project + - `./gradlew publishToMavenLocal` installs the maven artifacts in your local repository + - `./gradlew assemble && ./gradlew test` runs the test suite (See Testing below) + +### Versioning + +Mockito-Kotlin roughly follows SEMVER; version names are parsed from +git tags using `git describe`. + +### Testing + +Mockito-Kotlin's test suite is located in a separate `tests` module, +to allow running the tests using several Kotlin versions whilst still +keeping the base module at a recent version. + +Testing thus must be done in two stages: one to build the base artifact +to test against, and the actual execution of the tests against the +built artifact: + + - `./gradlew assemble` builds the base artifact + - `./gradlew test` runs the tests against the built artifact. + +Usually it is enough to test only using the default Kotlin versions; +CI will test against multiple versions. +If you want to test using a different Kotlin version locally, set +an environment variable `KOTLIN_VERSION` and run the tests. diff --git a/mockito-kotlin/build.gradle b/mockito-kotlin/build.gradle index 03f0515e..7f5bc362 100644 --- a/mockito-kotlin/build.gradle +++ b/mockito-kotlin/build.gradle @@ -3,7 +3,7 @@ apply from: '../publishing.gradle' apply plugin: 'org.jetbrains.dokka' buildscript { - ext.kotlin_version = "1.3.0" + ext.kotlin_version = "1.3.50" repositories { mavenCentral() diff --git a/tests/build.gradle b/tests/build.gradle index f3eafda4..cd11001b 100644 --- a/tests/build.gradle +++ b/tests/build.gradle @@ -1,6 +1,5 @@ buildscript { - ext.kotlin_version = System.getenv("KOTLIN_VERSION") ?: '1.0.7' - ext.kotlin_version = '1.3.0' + ext.kotlin_version = System.getenv("KOTLIN_VERSION") ?: '1.3.50' repositories { mavenCentral()