This repository has been archived by the owner on Mar 2, 2023. It is now read-only.
/
build.gradle
82 lines (68 loc) · 1.98 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
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
//Versioning
ext {
kotlin_version = "1.3.50"
materialVersion = "1.0.0"
coroutinesVersion = "1.3.2"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id("io.gitlab.arturbosch.detekt").version("1.1.1")
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
detekt {
// The version number is duplicated, please refer to plugins block for more details
version = "1.0.0-RC16"
input = files("$projectDir/app/src", "$projectDir/architecture/src")
config = files("$projectDir/config/detekt.yml")
filters = ".*test.*,.*/resources/.*,.*/tmp/.*"
reports {
html {
enabled = true
destination = file("$projectDir/build/reports/detekt.html")
}
xml {
enabled = false
}
}
}
configurations {
ktlint
}
dependencies {
ktlint "com.pinterest:ktlint:0.35.0"
// additional 3rd party ruleset(s) can be specified here
// just add them to the classpath (e.g. ktlint 'groupId:artifactId:version') and
// ktlint will pick them up
}
task ktlint(type: JavaExec, group: "verification") {
description = 'Check Kotlin code style.'
classpath = configurations.ktlint
main = 'com.pinterest.ktlint.Main'
args 'app/src/**/*.kt'
}
task ktlintFormat(type: JavaExec, group: 'formatting') {
description = 'Fix Kotlin code style deviations.'
classpath = configurations.ktlint
main = 'com.pinterest.ktlint.Main'
args '-F', 'app/src/**/*.kt'
}