-
Notifications
You must be signed in to change notification settings - Fork 90
/
build.gradle
49 lines (44 loc) · 1.6 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
import io.gitlab.arturbosch.detekt.Detekt
buildscript {
ext {
compose_version = '1.3.1'
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
id 'io.gitlab.arturbosch.detekt' version '1.21.0' apply false
}
allprojects {
def projectSource = file(projectDir)
def configFile = files("$rootDir/config/detekt/detekt.yml")
def baselineFile = file("$rootDir/config/detekt/baseline.xml")
def kotlinFiles = "**/*.kt"
def resourceFiles = "**/resources/**"
def buildFiles = "**/build/**"
apply plugin: 'io.gitlab.arturbosch.detekt'
tasks.register("detektAll", Detekt) {
def autoFix = project.hasProperty('detektAutoFix')
description = "Detekt build for all modules"
parallel = false
ignoreFailures = true
autoCorrect = autoFix
buildUponDefaultConfig = true
setSource(projectSource)
baseline.set(baselineFile)
config.setFrom(configFile)
include(kotlinFiles)
exclude(resourceFiles, buildFiles)
reports {
html.enabled = false
xml.enabled = true
txt.enabled = false
}
}
dependencies {
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0"
detektPlugins("ru.kode:detekt-rules-compose:1.2.2")
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0"
}
}