File tree Expand file tree Collapse file tree
build-src/src/main/kotlin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask
2- import java.net.URL
3-
41plugins {
5- id(" moulconfig.dokka.base" )
2+ id(" moulconfig.dokka.base" )
63}
7- afterEvaluate {
8- tasks.withType( AbstractDokkaLeafTask :: class ).configureEach {
9- dokkaSourceSets.configureEach {
10- println ( " Configuring $this " )
11- sourceLink {
12- localDirectory.set( project.file( " src/ " ) )
13- remoteUrl .set(URL ( " https://github.com/NotEnoughUpdates/MoulConfig/blob/ ${ Version .hash} / ${project.name} /src " ) )
14- remoteLineSuffix.set( " #L " )
15- }
16- }
17- }
4+
5+ dokka {
6+ dokkaSourceSets.configureEach {
7+ sourceLink {
8+ localDirectory.set(project.file( " src/ " ))
9+ remoteUrl( " https://github.com/NotEnoughUpdates/MoulConfig/blob/ ${ Version .hash} / ${ project.name} /src " )
10+ remoteLineSuffix .set(" #L " )
11+ }
12+ sourceRoots.setFrom(project.file( " src/main/kotlin " ), project.file( " src/main/java " ))
13+ }
14+ modulePath.set(project.path.removePrefix( " : " ).replace( " : " , " / " ))
1815}
1916
2017dependencies {
21- " dokkaPlugin " (" org.jetbrains.dokka:kotlin-as-java-plugin:1.9.20 " )
18+ dokkaHtmlPlugin (" org.jetbrains.dokka:kotlin-as-java-plugin:2.1.0 " )
2219}
Original file line number Diff line number Diff line change @@ -16,20 +16,17 @@ mkdocs {
1616}
1717
1818val compileAllDocs = tasks.register(" compileAllDocs" , Copy ::class ) {
19- dependsOn(tasks.mkdocsBuild)
20- dependsOn(tasks.dokkaHtmlMultiModule)
21- destinationDir = layout.buildDirectory.dir(" allDocs" ).get().asFile
22- from(tasks.mkdocsBuild)
23- from(tasks.dokkaHtmlMultiModule.get().outputDirectory) {
24- into(" javadocs" )
25- }
19+ dependsOn(tasks.mkdocsBuild)
20+ destinationDir = layout.buildDirectory.dir(" allDocs" ).get().asFile
21+ from(tasks.mkdocsBuild)
22+ from(tasks.dokkaGeneratePublicationHtml.flatMap { it.outputDirectory }) {
23+ into(" javadocs" )
24+ }
2625}
27-
2826val docJar = tasks.register(" docJar" , Zip ::class ) {
29- from(compileAllDocs)
30- archiveClassifier.set(" docs" )
27+ from(compileAllDocs)
28+ archiveClassifier.set(" docs" )
3129}
32-
3330val docConfig = configurations.create(" documentation" )
3431artifacts.add(docConfig.name, docJar)
35- tasks.assemble { dependsOn(docJar) }
32+ tasks.assemble { dependsOn(docJar) }
You can’t perform that action at this time.
0 commit comments