-
Notifications
You must be signed in to change notification settings - Fork 134
/
build.gradle
81 lines (69 loc) · 2.34 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
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: 'versions.gradle'
apply from: 'publish.gradle'
buildscript {
repositories {
google()
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.12.0'
/* Resolves issue of incorrect version use in one of jacoco/android plugin inner tasks (can be removed on AGP 7.2+). */
classpath 'org.jacoco:org.jacoco.core:0.8.3'
classpath 'org.jacoco:org.jacoco.report:0.8.3'
classpath 'org.jacoco:org.jacoco.agent:0.8.3'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
}
}
subprojects {
/* Force Jacoco Agent version upgrade (can be removed on AGP 7.2+). */
configurations.all {
resolutionStrategy {
eachDependency { details ->
if ('org.jacoco' == details.requested.group) {
details.useVersion '0.8.3'
}
}
}
}
afterEvaluate { project ->
if (project.hasProperty('android')) {
def config = android.defaultConfig
def ext = rootProject.ext
if (android.compileSdkVersion == null)
android.compileSdkVersion ext.compileSdkVersion
if (config.minSdkVersion == null)
config.minSdkVersion ext.minSdkVersion
if (config.targetSdkVersion == null)
config.targetSdkVersion ext.targetSdkVersion
if (config.versionCode == null)
config.versionCode ext.versionCode
if (config.versionName == null)
config.versionName ext.versionName
if (config.testInstrumentationRunner == null)
config.testInstrumentationRunner ext.testInstrumentationRunner
}
}
}
ext {
testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner'
}
task clean(type: Delete) {
delete project.buildDir
}