Prepare dokka (#1238)

* Prepare dokka

This updates to Dokka 1.4.10 and prepares for a future with Kotlin rewrite and mkdocs

* Spotless
This commit is contained in:
Zac Sweers
2020-09-25 22:37:13 -04:00
committed by GitHub
parent a1852a7315
commit 44fa05bce1
4 changed files with 28 additions and 16 deletions

3
.gitignore vendored
View File

@@ -25,3 +25,6 @@ obj
.DS_Store .DS_Store
.gradle .gradle
# Temporary until generating a docsite
docs/

View File

@@ -16,6 +16,8 @@
import com.diffplug.gradle.spotless.JavaExtension import com.diffplug.gradle.spotless.JavaExtension
import org.gradle.jvm.tasks.Jar import org.gradle.jvm.tasks.Jar
import org.jetbrains.dokka.gradle.DokkaTask
import java.net.URL
buildscript { buildscript {
dependencies { dependencies {
@@ -24,9 +26,9 @@ buildscript {
} }
plugins { plugins {
id("com.vanniktech.maven.publish") version "0.12.0" apply false id("com.vanniktech.maven.publish") version "0.13.0" apply false
id("org.jetbrains.dokka") version "0.10.1" apply false id("org.jetbrains.dokka") version "1.4.10" apply false
id("com.diffplug.spotless") version "5.5.0" id("com.diffplug.spotless") version "5.6.0"
} }
spotless { spotless {
@@ -102,17 +104,11 @@ spotless {
subprojects { subprojects {
repositories { repositories {
mavenCentral() mavenCentral()
@Suppress("UnstableApiUsage") jcenter().mavenContent {
exclusiveContent { // Required for Dokka
forRepository { includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
maven { includeGroup("org.jetbrains.dokka")
name = "JCenter" includeModule("org.jetbrains", "markdown")
setUrl("https://jcenter.bintray.com/")
}
}
filter {
includeModule("org.jetbrains.dokka", "dokka-fatjar")
}
} }
} }
@@ -137,5 +133,18 @@ subprojects {
} }
} }
} }
if (name != "codegen" && pluginManager.hasPlugin("org.jetbrains.kotlin.jvm")) {
apply(plugin = "org.jetbrains.dokka")
tasks.named<DokkaTask>("dokkaHtml") {
outputDirectory.set(rootDir.resolve("docs/1.x"))
dokkaSourceSets.configureEach {
skipDeprecated.set(true)
externalDocumentationLink {
url.set(URL("https://square.github.io/okio/2.x/okio/"))
}
}
}
}
} }
} }

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,