Skip to content

Commit c34b487

Browse files
committed
Create module to release a kt1.1 artifact
1 parent b6c84be commit c34b487

File tree

5 files changed

+50
-2
lines changed

5 files changed

+50
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ For Gradle users, add the following to your `build.gradle`, replacing `x.x.x` wi
1212
testCompile "com.nhaarman:mockito-kotlin:x.x.x"
1313
```
1414

15+
If you use Kotlin 1.1, you can instead depend on the `mockito-kotlin-kt1.1` artifact.
16+
17+
```groovy
18+
testCompile "com.nhaarman:mockito-kotlin-kt1.1:x.x.x"
19+
```
20+
1521
## Example
1622

1723
A test using Mockito-Kotlin typically looks like the following:

mockito-kotlin-kt1.1/build.gradle

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
apply plugin: 'kotlin'
2+
apply from: '../publishing.gradle'
3+
apply plugin: 'org.jetbrains.dokka'
4+
5+
buildscript {
6+
ext.kotlin_version = '1.1.2-4'
7+
8+
repositories {
9+
mavenCentral()
10+
jcenter()
11+
}
12+
13+
dependencies {
14+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
15+
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.14"
16+
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3"
17+
classpath "com.github.dcendents:android-maven-gradle-plugin:1.5"
18+
}
19+
}
20+
21+
repositories {
22+
mavenCentral()
23+
jcenter()
24+
}
25+
26+
dependencies {
27+
compile project(':mockito-kotlin')
28+
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
29+
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
30+
}
31+
32+
dokka {
33+
outputFormat = 'html'
34+
outputDirectory = "$buildDir/javadoc"
35+
36+
linkMapping {
37+
dir = "src/main/kotlin"
38+
url = "https://github.com/nhaarman/mockito-kotlin/tree/master/mockito-kotlin/src/main/kotlin"
39+
suffix = "#L"
40+
}
41+
}
42+
javadoc.dependsOn dokka

mockito-kotlin/build.gradle

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

55
buildscript {
File renamed without changes.

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
include 'mockito-kotlin'
2-
2+
include 'mockito-kotlin-kt1.1'

0 commit comments

Comments
 (0)