-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
86 lines (76 loc) · 2.82 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
// val kotlin_version by extra("1.5.10")
dependencies {
classpath(kotlin("gradle-plugin", version = Dependencies.Kotlin.version))
classpath("com.android.tools.build:gradle:4.1.1")
classpath("io.github.leobert-lan:easy-publish:1.2.1")
classpath("io.github.leobert-lan:traceman-plugin:1.0.6")
}
repositories {
mavenLocal()
mavenCentral()
maven { setUrl("https://jitpack.io") }
maven { setUrl("https://plugins.gradle.org/m2/") }
}
}
plugins {
id("com.google.devtools.ksp") version Dependencies.Kotlin.Ksp.version apply false
kotlin("jvm") version Dependencies.Kotlin.version apply false
id("org.jetbrains.dokka") version Dependencies.Kotlin.dokkaVersion apply false
// id("com.vanniktech.maven.publish") version "0.15.1" apply false
}
subprojects {
repositories {
mavenLocal()
mavenCentral()
google()
maven { setUrl("https://jitpack.io") }
maven { setUrl("https://plugins.gradle.org/m2/") }
// Required for Dokka
exclusiveContent {
forRepository {
maven {
name = "JCenter"
setUrl("https://jcenter.bintray.com/")
}
}
filter {
includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
includeGroup("org.jetbrains.dokka")
includeModule("org.jetbrains", "markdown")
}
}
}
pluginManager.withPlugin("java") {
configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
configure<KotlinProjectExtension> {
explicitApi()
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = Dependencies.Kotlin.jvmTarget
@Suppress("SuspiciousCollectionReassignment")
freeCompilerArgs += Dependencies.Kotlin.defaultFreeCompilerArgs
}
}
apply(plugin = "org.jetbrains.dokka")
tasks.named<DokkaTask>("dokkaHtml") {
outputDirectory.set(rootProject.rootDir.resolve("docs/0.x"))
dokkaSourceSets.configureEach {
skipDeprecated.set(true)
// TODO Dokka can't parse javadoc.io yet
// externalDocumentationLink {
// url.set(URL("https://javadoc.io/doc/com.google.auto.service/auto-service-annotations/latest/index.html"))
// }
}
}
}
}