Make Dokka work
Fix deprecations
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
package org.openrndr.extra.convention
|
||||
|
||||
import org.jetbrains.dokka.gradle.DokkaTaskPartial
|
||||
import java.net.URL
|
||||
|
||||
plugins {
|
||||
id("org.jetbrains.dokka")
|
||||
}
|
||||
@@ -11,27 +8,31 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
tasks.withType<DokkaTaskPartial>() {
|
||||
dokkaSourceSets {
|
||||
configureEach {
|
||||
skipDeprecated.set(true)
|
||||
val sourcesDirectory = try {
|
||||
file("src/$name/kotlin", PathValidation.EXISTS)
|
||||
} catch (_: InvalidUserDataException) {
|
||||
return@configureEach
|
||||
}
|
||||
// Specifies the location of the project source code on the Web.
|
||||
// If provided, Dokka generates "source" links for each declaration.
|
||||
sourceLink {
|
||||
// Unix based directory relative path to the root of the project (where you execute gradle respectively).
|
||||
localDirectory.set(sourcesDirectory)
|
||||
// URL showing where the source code can be accessed through the web browser
|
||||
remoteUrl.set(
|
||||
URL("https://github.com/openrndr/orx/blob/master/${moduleName.get()}/src/$name/kotlin")
|
||||
)
|
||||
// Suffix which is used to append the line number to the URL. Use #L for GitHub
|
||||
remoteLineSuffix.set("#L")
|
||||
}
|
||||
dokka {
|
||||
pluginsConfiguration.html {
|
||||
customStyleSheets.from(rootProject.file("dokka/styles/extra.css"))
|
||||
customAssets.from(rootProject.file("dokka/images/logo-icon.svg"))
|
||||
}
|
||||
dokkaSourceSets.configureEach {
|
||||
skipDeprecated.set(false)
|
||||
|
||||
val sourcesDirectory = try {
|
||||
file("src/$name/kotlin", PathValidation.EXISTS)
|
||||
} catch (_: InvalidUserDataException) {
|
||||
return@configureEach
|
||||
}
|
||||
|
||||
// Specifies the location of the project source code on the Web.
|
||||
// If provided, Dokka generates "source" links for each declaration.
|
||||
sourceLink {
|
||||
// Unix based directory relative path to the root of the project (where you execute gradle respectively).
|
||||
localDirectory = sourcesDirectory
|
||||
|
||||
// URL showing where the source code can be accessed through the web browser
|
||||
remoteUrl("https://github.com/openrndr/orx/blob/master/${moduleName.get()}/src/$name/kotlin")
|
||||
|
||||
// Suffix which is used to append the line number to the URL. Use #L for GitHub
|
||||
remoteLineSuffix.set("#L")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ val isReleaseVersion = !(version.toString()).endsWith("SNAPSHOT")
|
||||
if (shouldPublish) {
|
||||
publishing {
|
||||
publications {
|
||||
val fjdj = tasks.create("fakeJavaDocJar", Jar::class) {
|
||||
val fjdj = tasks.register("fakeJavaDocJar", Jar::class) {
|
||||
archiveClassifier.set("javadoc")
|
||||
}
|
||||
named("js") {
|
||||
@@ -190,4 +190,4 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<JavaExec>().matching { it.name == "jvmRun" }.configureEach { workingDir = rootDir }
|
||||
tasks.withType<JavaExec>().matching { it.name == "jvmRun" }.configureEach { workingDir = rootDir }
|
||||
|
||||
Reference in New Issue
Block a user