-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
138 lines (113 loc) · 3.21 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
apply plugin: "io.gitlab.arturbosch.detekt"
tasks.withType(io.gitlab.arturbosch.detekt.Detekt) {
include '**/*.kt'
include '**/*.kts'
exclude 'build/'
for (int i = 0; i < subprojects.size(); i++) {
exclude subprojects[i].project.name + "/build/"
}
}
detekt {
input = files("$projectDir")
config = files("$rootDir/detekt_config.yml")
parallel = true
reports {
txt.enabled = false
xml.enabled = false
html.destination = file("build/reports/detekt.html")
}
}
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
maven {
url "https://maven.fabric.io/public"
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.0"
classpath "com.dicedmelon.gradle:jacoco-android:0.1.4"
classpath "com.github.ben-manes:gradle-versions-plugin:0.27.0"
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://jitpack.io"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
}
subprojects {
if (project.name == "app") {
apply plugin: "com.android.application"
} else {
apply plugin: "com.android.library"
}
apply plugin: "kotlin-android"
apply plugin: "kotlin-android-extensions"
apply plugin: "kotlin-kapt"
apply plugin: "jacoco-android"
apply plugin: "com.github.ben-manes.versions"
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
dataBinding {
enabled true
}
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
versionCode Integer.parseInt(getProperty("app.versionCode"))
versionName getProperty("app.versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile("proguard-android.txt"), project.projectDir.path + "/proguard-rules.pro"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
flavorDimensions("version")
productFlavors {
development {
}
staging {
}
production {}
}
kotlinOptions {
freeCompilerArgs += "-Xuse-experimental=kotlin.Experimental"
jvmTarget = "1.8"
}
testOptions.unitTests.all {
testOptions.unitTests.includeAndroidResources = true
jacoco {
includeNoLocationClasses = true
}
}
}
apply from: rootDir.path + "/dependencies.gradle"
jacoco {
toolVersion = "0.8.4"
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}