Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

Commit 8222655

Browse files
committed
Move examples into dokka subfolder and add kotlin-as-java example
1 parent 2651c58 commit 8222655

File tree

30 files changed

+364
-6
lines changed

30 files changed

+364
-6
lines changed
File renamed without changes.

‎gradle/dokka-gradle-example/build.gradle.kts renamed to ‎gradle/dokka/dokka-gradle-example/build.gradle.kts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import org.jetbrains.dokka.gradle.DokkaTask
22

33
plugins {
4-
kotlin("jvm") version "1.4.0-M3"
5-
id("org.jetbrains.dokka") version ("1.4.0-M3-dev-65")
4+
kotlin("jvm") version "1.4-M3"
5+
id("org.jetbrains.dokka") version ("1.4.0-M3-dev-69")
66
}
77

88
repositories {
@@ -18,12 +18,13 @@ dependencies {
1818

1919
tasks.withType<DokkaTask> {
2020
dokkaSourceSets {
21-
configureEach {
21+
register("main") {
2222
moduleDisplayName = "Dokka Gradle Example"
2323
includes = listOf("Module.md")
2424
sourceLink {
2525
path = "src/main/kotlin"
26-
url = "https://github.com/Kotlin/kotlin-examples/tree/master/gradle/dokka-gradle-example/src/main/kotlin"
26+
url = "https://github.com/Kotlin/kotlin-examples/tree/master/" +
27+
"gradle/dokka/dokka-gradle-example/src/main/kotlin"
2728
lineSuffix = "#L"
2829
}
2930
}
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.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import org.jetbrains.dokka.gradle.DokkaTask
2+
3+
plugins {
4+
kotlin("jvm") version "1.4-M3"
5+
id("org.jetbrains.dokka") version ("1.4.0-M3-dev-69")
6+
}
7+
8+
repositories {
9+
mavenCentral()
10+
jcenter()
11+
maven("https://dl.bintray.com/kotlin/kotlin-dev")
12+
}
13+
14+
dependencies {
15+
implementation(kotlin("stdlib"))
16+
testImplementation(kotlin("test-junit"))
17+
18+
// Will apply the plugin to all dokka tasks
19+
dokkaPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.4.0-M3-dev-69")
20+
21+
// Will apply the plugin only to the `:dokkaHtml` task
22+
//dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.4.0-M3-dev-69")
23+
24+
// Will apply the plugin only to the `:dokkaGfm` task
25+
//dokkaGfmPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.4.0-M3-dev-69")
26+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /