File tree Expand file tree Collapse file tree 6 files changed +43
-24
lines changed
Expand file tree Collapse file tree 6 files changed +43
-24
lines changed Original file line number Diff line number Diff line change @@ -3,32 +3,10 @@ group = "org.ktorm"
33version = file(" ktorm.version" ).readLines()[0 ]
44
55plugins {
6- id(" org.jetbrains. dokka" ) version " 1.9.20 "
6+ id(" ktorm. dokka" )
77}
88
99repositories {
1010 mavenCentral()
1111 gradlePluginPortal()
1212}
13-
14- tasks.dokkaHtmlMultiModule {
15- val templatesDir = System .getenv(" DOKKA_TEMPLATES_DIR" )
16- if (! templatesDir.isNullOrEmpty()) {
17- pluginsMapConfiguration.set(mapOf (" org.jetbrains.dokka.base.DokkaBase" to """ {"templatesDir": "$templatesDir "}""" ))
18- }
19- }
20-
21- subprojects {
22- apply (plugin = " org.jetbrains.dokka" )
23-
24- tasks.named< org.jetbrains.dokka.gradle.DokkaTaskPartial > (" dokkaHtmlPartial" ) {
25- dokkaSourceSets.named(" main" ) {
26- suppressGeneratedFiles.set(false )
27- sourceLink {
28- localDirectory.set(file(" src/main/kotlin" ))
29- remoteUrl.set(java.net.URL (" https://github.com/kotlin-orm/ktorm/blob/master/${project.name} /src/main/kotlin" ))
30- remoteLineSuffix.set(" #L" )
31- }
32- }
33- }
34- }
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ repositories {
1010
1111dependencies {
1212 api(" org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23" )
13+ api(" org.jetbrains.dokka:dokka-gradle-plugin:1.9.20" )
14+ api(" org.jetbrains.dokka:dokka-base:1.9.20" )
1315 api(" org.moditect:moditect:1.0.0.RC1" )
1416 api(" io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.6" )
1517}
Original file line number Diff line number Diff line change 1+ import gradle.kotlin.dsl.accessors._f5007bc516eebc049270414be01b92ac.dokkaJavadoc
2+
3+ plugins {
4+ id(" org.jetbrains.dokka" )
5+ }
6+
7+ tasks.named< org.jetbrains.dokka.gradle.DokkaMultiModuleTask > (" dokkaHtmlMultiModule" ) {
8+ val tmplDir = System .getenv(" DOKKA_TEMPLATES_DIR" )
9+ if (! tmplDir.isNullOrEmpty()) {
10+ pluginConfiguration< org.jetbrains.dokka.base.DokkaBase , org.jetbrains.dokka.base.DokkaBaseConfiguration > {
11+ templatesDir = File (tmplDir)
12+ }
13+ }
14+ }
15+
16+ subprojects {
17+ apply (plugin = " org.jetbrains.dokka" )
18+
19+ tasks.named< org.jetbrains.dokka.gradle.DokkaTaskPartial > (" dokkaHtmlPartial" ) {
20+ dokkaSourceSets.named(" main" ) {
21+ suppressGeneratedFiles.set(false )
22+ sourceLink {
23+ localDirectory.set(file(" src/main/kotlin" ))
24+ remoteUrl.set(java.net.URL (" https://github.com/kotlin-orm/ktorm/blob/master/${project.name} /src/main/kotlin" ))
25+ remoteLineSuffix.set(" #L" )
26+ }
27+ }
28+ }
29+ }
Original file line number Diff line number Diff line change @@ -3,14 +3,17 @@ plugins {
33 id(" kotlin" )
44 id(" signing" )
55 id(" maven-publish" )
6+ id(" org.jetbrains.dokka" )
67}
78
89val jarSources by tasks.registering(Jar ::class ) {
9- archiveClassifier.set(" sources" )
1010 from(sourceSets.main.map { it.allSource })
11+ archiveClassifier.set(" sources" )
1112}
1213
1314val jarJavadoc by tasks.registering(Jar ::class ) {
15+ dependsOn(tasks.dokkaJavadoc)
16+ from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
1417 archiveClassifier.set(" javadoc" )
1518}
1619
Original file line number Diff line number Diff line change 11
22plugins {
33 id(" kotlin" )
4+ id(" org.jetbrains.dokka" )
45}
56
67val generatedSourceDir = " ${project.layout.buildDirectory.asFile.get()} /generated/source/main/kotlin"
@@ -354,6 +355,9 @@ tasks {
354355 " jarSources" {
355356 dependsOn(generateTuples)
356357 }
358+ dokkaJavadoc {
359+ dependsOn(generateTuples)
360+ }
357361}
358362
359363sourceSets.main {
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ tasks {
2929 " jarSources" {
3030 dependsOn(generatePackageVersion)
3131 }
32+ dokkaJavadoc {
33+ dependsOn(generatePackageVersion)
34+ }
3235}
3336
3437sourceSets.main {
You can’t perform that action at this time.
0 commit comments