-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
62 lines (50 loc) · 1.64 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
plugins {
kotlin("jvm") apply false
id("org.jetbrains.dokka") version "1.4.32" apply false
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}
subprojects {
plugins.withType<JavaPlugin> {
configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
plugins.withId("org.jetbrains.kotlin.jvm") {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
dependencies {
"implementation"(kotlin("stdlib-jdk8"))
}
}
plugins.withType<MavenPublishPlugin> {
apply(from = "$rootDir/gradle/publishing.gradle.kts")
}
plugins.withId("org.jetbrains.dokka") {
dependencies {
"dokkaJavadocPlugin"("org.jetbrains.dokka:kotlin-as-java-plugin:1.4.32")
}
tasks.withType<Jar>().matching { it.name == "javadocJar" }
.configureEach {
from(tasks.named("dokkaJavadoc"))
}
tasks.withType<org.jetbrains.dokka.gradle.DokkaTask> {
dokkaSourceSets {
named("main") {
sourceLink {
val githubUrl = project.extra["github.url"] as String
localDirectory.set(project.file("src/main/kotlin"))
remoteUrl.set(java.net.URL("$githubUrl/tree/master/"))
remoteLineSuffix.set("#L")
}
}
}
}
}
}
nexusPublishing {
repositories {
sonatype()
}
}