Split kotlin modules (#316)
This commit is contained in:
parent
762de3dfba
commit
d2a47ad941
17 changed files with 127 additions and 78 deletions
|
|
@ -0,0 +1,52 @@
|
|||
import org.jetbrains.dokka.gradle.DokkaTask
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("cloud.base-conventions")
|
||||
kotlin("jvm")
|
||||
id("org.jetbrains.dokka")
|
||||
id("org.jlleitschuh.gradle.ktlint")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain {
|
||||
(this as JavaToolchainSpec).apply {
|
||||
languageVersion.set(JavaLanguageVersion.of(8))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val compileAndTest: Configuration by configurations.creating
|
||||
listOf(configurations.compileOnly, configurations.testImplementation).forEach { config ->
|
||||
config {
|
||||
extendsFrom(compileAndTest)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileAndTest(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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
explicitApi()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue