-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
75 lines (68 loc) · 2.37 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
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import io.gitlab.arturbosch.detekt.Detekt
buildscript {
repositories {
gradlePluginPortal()
mavenCentral()
google()
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://jitpack.io")
}
dependencies {
classpath(libs.android.tools.gradle.plugin)
classpath(libs.kotlin.gradle.plugin)
classpath(libs.compose.gradle.plugin)
classpath(libs.navigation.safe.args.gradle.plugin)
classpath(libs.sqldelight.gradle.plugin)
}
}
// run ./gradlew dokkaHtmlMultiModule to create the documentation
// then deploy the website (cd website, yarn deploy)
plugins {
alias(libs.plugins.org.jetbrains.dokka)
alias(libs.plugins.io.gitlab.arturbosch.detekt)
alias(libs.plugins.com.louiscad.complete.kotlin)
alias(libs.plugins.org.barfuin.gradle.taskinfo)
alias(libs.plugins.org.jetbrains.kotlin.serialization)
}
tasks.dokkaHtmlMultiModule.configure {
outputDirectory.set(buildDir.resolve("../website/static/dokka"))
}
detekt {
config = files("${rootProject.projectDir}/config/detekt/detekt.yml")
// activate all available (even unstable) rules.
source = files("${rootProject.projectDir}")
allRules = false
ignoreFailures = false
}
tasks.withType<Detekt>().configureEach {
include("**/*.kt")
include("**/*.kts")
exclude("**/resources/**")
exclude("**/build/**")
reports {
html.required.set(true) // observe findings in your browser with structure and code snippets
}
}
allprojects {
repositories {
mavenCentral()
google()
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://jitpack.io")
}
afterEvaluate {
// eliminate log pollution until Android support for KMM improves
val sets2BeRemoved = setOf(
"androidAndroidTestRelease",
"androidTestFixtures",
"androidTestFixturesDebug",
"androidTestFixturesRelease"
)
project.extensions.findByType<KotlinMultiplatformExtension>()?.let { kmpExt ->
kmpExt.sourceSets.removeAll { sets2BeRemoved.contains(it.name) }
}
}
}