Skip to content

Commit 675a161

Browse files
committed
extend the example; update to Dokka 0.9.9
1 parent 9a84930 commit 675a161

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Module dokka-gradle-example
2+
3+
This is an example of how you can write module documentation with Dokka.
4+
5+
# Package demo
6+
7+
This package contains a few examples of Dokka usage.

gradle/dokka-gradle-example/build.gradle

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
buildscript {
2-
ext.kotlin_version = '1.0.2'
2+
ext.kotlin_version = '1.0.3'
33

44
repositories {
5+
mavenLocal()
56
mavenCentral()
67
jcenter()
78
maven {
@@ -11,7 +12,7 @@ buildscript {
1112

1213
dependencies {
1314
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14-
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.8"
15+
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.9"
1516
}
1617
}
1718

@@ -28,13 +29,24 @@ repositories {
2829
}
2930

3031
dependencies {
31-
testCompile group: 'junit', name: 'junit', version: '4.11'
32-
compile "org.jetbrains.kotlin:kotlin-stdlib:1.0.1"
32+
testCompile group: 'junit', name: 'junit', version: '4.12'
33+
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
3334
}
3435
sourceSets {
3536
main.java.srcDirs += 'src/main/kotlin'
3637
}
3738

3839
dokka {
40+
includes = ['Module.md']
3941

42+
linkMapping {
43+
dir = "src/main/kotlin"
44+
url = "https://github.com/JetBrains/kotlin-examples/tree/master/gradle/dokka-gradle-example/src/main/kotlin"
45+
suffix = "#L"
46+
}
47+
}
48+
49+
task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
50+
outputFormat = "javadoc"
51+
outputDirectory = "$buildDir/dokkaJavadoc"
4052
}

0 commit comments

Comments
 (0)