-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
55 lines (47 loc) · 2 KB
/
build.gradle
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
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektPlugin
import io.gitlab.arturbosch.detekt.report.ReportMergeTask
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias libs.plugins.daggerHiltPlugin apply false
alias libs.plugins.androidApplicationPlugin apply false
alias libs.plugins.kotlinAndroidPlugin apply false
alias libs.plugins.kotlinKaptPlugin apply false
alias libs.plugins.hiddenSecretPlugins apply false
alias libs.plugins.spotlessPlugin
alias libs.plugins.detektPlugin
alias libs.plugins.gradleVersionsPlugin
alias libs.plugins.versionCatalogUpdatePlugin
}
task detektReportMerge(type: ReportMergeTask) {
// ROOT_DIR/build/reports/detekt/merge.xml
output = project.layout.buildDirectory.file("reports/detekt/merge.xml")
}
apply from: "$project.rootDir/gradle/spotless_config.gradle"
apply from: "$project.rootDir/gradle/detekt_config.gradle"
apply from: "$project.rootDir/gradle/version_catalog_update.gradle"
subprojects {
repositories {
google()
mavenCentral()
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += "-Xopt-in=kotlin.ExperimentalStdlibApi"
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
freeCompilerArgs += "-Xopt-in=androidx.paging.ExperimentalPagingApi"
freeCompilerArgs += "-Xopt-in=kotlin.contracts.ExperimentalContracts"
freeCompilerArgs += "-Xopt-in=kotlin.Experimental"
jvmTarget = JavaVersion.VERSION_11
}
}
plugins.withType(DetektPlugin) {
tasks.withType(Detekt) { detektTask ->
finalizedBy(detektReportMerge)
detektReportMerge.configure { mergeTask ->
mergeTask.input.from(detektTask.xmlReportFile)
}
}
}
}