Skip to content

Commit 442d227

Browse files
authored
Merge pull request #361 from nhaarman/update-build
Update build
2 parents ce6a747 + 87a2043 commit 442d227

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ matrix:
1111
- jdk: openjdk8
1212
env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.2.50
1313
- jdk: openjdk8
14-
env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.3.40
14+
env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.3.50
1515
- jdk: openjdk8
1616
env: TERM=dumb KOTLIN_VERSION=1.0.7
1717
- jdk: openjdk8
1818
env: TERM=dumb KOTLIN_VERSION=1.1.61
1919
- jdk: openjdk8
2020
env: TERM=dumb KOTLIN_VERSION=1.2.50
2121
- jdk: openjdk8
22-
env: TERM=dumb KOTLIN_VERSION=1.3.40
22+
env: TERM=dumb KOTLIN_VERSION=1.3.50
2323

2424

2525
env:

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.

mockito-kotlin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply from: '../publishing.gradle'
33
apply plugin: 'org.jetbrains.dokka'
44

55
buildscript {
6-
ext.kotlin_version = "1.3.0"
6+
ext.kotlin_version = "1.3.50"
77

88
repositories {
99
mavenCentral()

tests/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = System.getenv("KOTLIN_VERSION") ?: '1.0.7'
3-
ext.kotlin_version = '1.3.0'
2+
ext.kotlin_version = System.getenv("KOTLIN_VERSION") ?: '1.3.50'
43

54
repositories {
65
mavenCentral()

0 commit comments

Comments
 (0)