mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 07:29:22 +08:00
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:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -25,3 +25,6 @@ obj
|
||||
.DS_Store
|
||||
|
||||
.gradle
|
||||
|
||||
# Temporary until generating a docsite
|
||||
docs/
|
||||
|
@@ -16,6 +16,8 @@
|
||||
|
||||
import com.diffplug.gradle.spotless.JavaExtension
|
||||
import org.gradle.jvm.tasks.Jar
|
||||
import org.jetbrains.dokka.gradle.DokkaTask
|
||||
import java.net.URL
|
||||
|
||||
buildscript {
|
||||
dependencies {
|
||||
@@ -24,9 +26,9 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.vanniktech.maven.publish") version "0.12.0" apply false
|
||||
id("org.jetbrains.dokka") version "0.10.1" apply false
|
||||
id("com.diffplug.spotless") version "5.5.0"
|
||||
id("com.vanniktech.maven.publish") version "0.13.0" apply false
|
||||
id("org.jetbrains.dokka") version "1.4.10" apply false
|
||||
id("com.diffplug.spotless") version "5.6.0"
|
||||
}
|
||||
|
||||
spotless {
|
||||
@@ -102,17 +104,11 @@ spotless {
|
||||
subprojects {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@Suppress("UnstableApiUsage")
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = "JCenter"
|
||||
setUrl("https://jcenter.bintray.com/")
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeModule("org.jetbrains.dokka", "dokka-fatjar")
|
||||
}
|
||||
jcenter().mavenContent {
|
||||
// Required for Dokka
|
||||
includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
|
||||
includeGroup("org.jetbrains.dokka")
|
||||
includeModule("org.jetbrains", "markdown")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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/"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* 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
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* 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
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
Reference in New Issue
Block a user