11package org.openrndr.extra.convention
22
3- import org.jetbrains.dokka.gradle.DokkaTaskPartial
4- import java.net.URL
5-
63plugins {
74 id(" org.jetbrains.dokka" )
85}
@@ -11,27 +8,31 @@ repositories {
118 mavenCentral()
129}
1310
14- tasks.withType<DokkaTaskPartial >() {
15- dokkaSourceSets {
16- configureEach {
17- skipDeprecated.set(true )
18- val sourcesDirectory = try {
19- file(" src/$name /kotlin" , PathValidation .EXISTS )
20- } catch (_: InvalidUserDataException ) {
21- return @configureEach
22- }
23- // Specifies the location of the project source code on the Web.
24- // If provided, Dokka generates "source" links for each declaration.
25- sourceLink {
26- // Unix based directory relative path to the root of the project (where you execute gradle respectively).
27- localDirectory.set(sourcesDirectory)
28- // URL showing where the source code can be accessed through the web browser
29- remoteUrl.set(
30- URL (" https://github.com/openrndr/orx/blob/master/${moduleName.get()} /src/$name /kotlin" )
31- )
32- // Suffix which is used to append the line number to the URL. Use #L for GitHub
33- remoteLineSuffix.set(" #L" )
34- }
11+ dokka {
12+ pluginsConfiguration.html {
13+ customStyleSheets.from(rootProject.file(" dokka/styles/extra.css" ))
14+ customAssets.from(rootProject.file(" dokka/images/logo-icon.svg" ))
15+ }
16+ dokkaSourceSets.configureEach {
17+ skipDeprecated.set(false )
18+
19+ val sourcesDirectory = try {
20+ file(" src/$name /kotlin" , PathValidation .EXISTS )
21+ } catch (_: InvalidUserDataException ) {
22+ return @configureEach
23+ }
24+
25+ // Specifies the location of the project source code on the Web.
26+ // If provided, Dokka generates "source" links for each declaration.
27+ sourceLink {
28+ // Unix based directory relative path to the root of the project (where you execute gradle respectively).
29+ localDirectory = sourcesDirectory
30+
31+ // URL showing where the source code can be accessed through the web browser
32+ remoteUrl(" https://github.com/openrndr/orx/blob/master/${moduleName.get()} /src/$name /kotlin" )
33+
34+ // Suffix which is used to append the line number to the URL. Use #L for GitHub
35+ remoteLineSuffix.set(" #L" )
3536 }
3637 }
37- }
38+ }
0 commit comments