Skip to content

Commit 5884adc

Browse files
authored
Merge pull request #96 from nhaarman/dokka
Use dokka do generate docs
2 parents f165976 + fb74552 commit 5884adc

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

mockito-kotlin/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
apply plugin: 'kotlin'
22
apply from: './publishing.gradle'
3+
apply plugin: 'org.jetbrains.dokka'
34

45
buildscript {
56
ext.kotlin_version = '1.0.4'
67

78
repositories {
89
mavenCentral()
10+
jcenter()
911
}
1012

1113
dependencies {
1214
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
15+
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.9"
1316
}
1417
}
1518

@@ -48,3 +51,15 @@ dependencies {
4851
testCompile "junit:junit:4.12"
4952
testCompile "com.nhaarman:expect.kt:0.6.0"
5053
}
54+
55+
dokka {
56+
outputFormat = 'html'
57+
outputDirectory = "$buildDir/javadoc"
58+
59+
linkMapping {
60+
dir = "src/main/kotlin"
61+
url = "https://github.com/nhaarman/mockito-kotlin/tree/master/mockito-kotlin/src/main/kotlin"
62+
suffix = "#L"
63+
}
64+
}
65+
javadoc.dependsOn dokka

mockito-kotlin/publishing.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def sonatypePassword = hasProperty('sonatype_password') ? sonatype_password : Sy
99

1010
task javadocJar(type: Jar, dependsOn: javadoc) {
1111
classifier = 'javadoc'
12-
from 'build/docs/javadoc'
12+
from 'build/javadoc'
1313
}
1414

1515
task sourcesJar(type: Jar) {

0 commit comments

Comments
 (0)