Skip to content

Commit 4bcf696

Browse files
committed
Update README to include build instructions
1 parent ce6a747 commit 4bcf696

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,34 @@ fun doAction_doesSomething(){
3434
```
3535

3636
For more info and samples, see the [Wiki](https://github.com/nhaarman/mockito-kotlin/wiki).
37+
38+
## Building
39+
40+
Mockito-Kotlin is built with Gradle.
41+
42+
- `./gradlew build` builds the project
43+
- `./gradlew publishToMavenLocal` installs the maven artifacts in your local repository
44+
- `./gradlew assemble && ./gradlew test` runs the test suite (See Testing below)
45+
46+
### Versioning
47+
48+
Mockito-Kotlin roughly follows SEMVER; version names are parsed from
49+
git tags using `git describe`.
50+
51+
### Testing
52+
53+
Mockito-Kotlin's test suite is located in a separate `tests` module,
54+
to allow running the tests using several Kotlin versions whilst still
55+
keeping the base module at a recent version.
56+
57+
Testing thus must be done in two stages: one to build the base artifact
58+
to test against, and the actual execution of the tests against the
59+
built artifact:
60+
61+
- `./gradlew assemble` builds the base artifact
62+
- `./gradlew test` runs the tests against the built artifact.
63+
64+
Usually it is enough to test only using the default Kotlin versions;
65+
CI will test against multiple versions.
66+
If you want to test using a different Kotlin version locally, set
67+
an environment variable `KOTLIN_VERSION` and run the tests.

0 commit comments

Comments
 (0)