Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build #361

Merged
merged 3 commits into from Sep 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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