oblak/build-logic/src/main/kotlin/cloud.kotlin-conventions.gradle.kts
zml ed7b7569a8 build: switch to spotless (#355)
* build: switch to spotless

add in some other basic formatting steps that allow for easy
auto-correction

* build: lint text files as well

* chore: remove license headers from package-info files

spotless can't verify these
2022-06-18 22:52:58 -07:00

50 lines
1 KiB
Kotlin

import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("cloud.base-conventions")
kotlin("jvm")
id("org.jetbrains.dokka")
}
kotlin {
jvmToolchain {
(this as JavaToolchainSpec).apply {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
}
dependencies {
api(kotlin("stdlib-jdk8"))
}
tasks {
withType<DokkaTask> {
dokkaSourceSets.named("main") {
includes.from(layout.projectDirectory.file("src/main/descriptions.md"))
/*externalDocumentationLink { // todo: fix KDoc linking to JavaDoc
url.set(URL("https://javadoc.commandframework.cloud/"))
packageListUrl.set(URL("https://javadoc.commandframework.cloud/allpackages-index.html"))
}*/
}
}
javadocJar {
from(dokkaHtml)
}
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
spotless {
kotlin {
ktlint()
}
}
kotlin {
explicitApi()
}