Skip to content

Commit

Permalink
Merge pull request #361 from nhaarman/update-build
Browse files Browse the repository at this point in the history
Update build
  • Loading branch information
nhaarman committed Sep 8, 2019
2 parents ce6a747 + 87a2043 commit 442d227
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -11,15 +11,15 @@ 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
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.40
env: TERM=dumb KOTLIN_VERSION=1.3.50


env:
Expand Down
31 changes: 31 additions & 0 deletions README.md
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion mockito-kotlin/build.gradle
Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions 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()
Expand Down

0 comments on commit 442d227

Please sign in to comment.