-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle.kts
89 lines (76 loc) · 2.7 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
87
88
89
plugins {
// https://kotlinlang.org/docs/releases.html#release-details
val kotlinVersion = "1.7.20"
// https://github.com/diffplug/spotless/tags
val spotlessVersion = "6.11.0"
// https://github.com/Kotlin/dokka/tags
val dokkaVersions = "1.5.30"
// https://kotlinlang.org/docs/multiplatform.html
val multiplatformVersion = "1.7.10"
// https://github.com/mpetuska/npm-publish
val npmPublishVersion = "3.0.3"
// https://developer.android.com/studio/releases/gradle-plugin#updating-plugin
val androidVersion = "7.3.1"
// https://developer.android.com/training/dependency-injection/hilt-android
val hiltVersion = "2.44"
// android
id("com.google.dagger.hilt.android") version hiltVersion apply false
id("com.android.application").version(androidVersion).apply(false)
id("com.android.library").version(androidVersion).apply(false)
kotlin("android").version(kotlinVersion).apply(false)
// common
kotlin("multiplatform").version(multiplatformVersion).apply(false)
kotlin("plugin.serialization").version(kotlinVersion).apply(false)
id("dev.petuska.npm.publish").version(npmPublishVersion).apply(false)
// gradle
id("com.diffplug.spotless").version(spotlessVersion)
id("org.jetbrains.dokka").version(dokkaVersions)
}
buildscript {
// https://github.com/yshrsmz/BuildKonfig
val buildkonfigVersion = "0.13.3"
repositories {
google()
gradlePluginPortal()
mavenCentral()
}
dependencies {
classpath("com.codingfeline.buildkonfig:buildkonfig-gradle-plugin:$buildkonfigVersion")
}
}
tasks.withType<org.jetbrains.dokka.gradle.DokkaMultiModuleTask>().configureEach {
outputDirectory.set(rootDir.resolve("docs/dokka"))
failOnWarning.set(true)
}
subprojects {
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "com.diffplug.spotless")
spotless {
kotlin {
target("**/*.kt")
targetExclude("**/build/**")
ktlint("0.42.1")
.userData(
mapOf(
"disabled_rules" to "no-wildcard-imports",
)
)
licenseHeaderFile("$rootDir/copyright.txt")
}
format("misc") {
target("**/*.gradle", "**/*.md", "**/.gitignore")
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}
tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
suppressInheritedMembers.set(true)
dokkaSourceSets {
configureEach {
includes.from("dokka.md")
includeNonPublic.set(true)
}
}
}
}