-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
104 lines (90 loc) · 3.3 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
buildscript {
repositories {
google()
maven { url "https://dl.bintray.com/android/android-tools" }
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://kotlin.bintray.com/kotlinx" }
}
dependencies {
classpath BuildPlugins.androidGradlePlugin
classpath BuildPlugins.kotlinGradlePlugin
classpath BuildPlugins.kotlinSerializiationPlugin
classpath BuildPlugins.dependencyGraphGeneratorPlugin
// classpath BuildPlugins.androidJunitJacocoPlugin
classpath BuildPlugins.detektGradlePlugin
classpath BuildPlugins.canidropjetifierPlugin
}
}
//apply plugin: "com.vanniktech.android.junit.jacoco"
apply plugin: "com.github.plnice.canidropjetifier"
//junitJacoco {
// jacocoVersion = "0.8.2"
// includeNoLocationClasses = true
//}
allprojects {
repositories {
google()
maven { url "https://dl.bintray.com/android/android-tools" }
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url "https://kotlin.bintray.com/kotlinx" }
maven { url "https://dl.bintray.com/fcostaa/maven" }
}
apply plugin: "io.gitlab.arturbosch.detekt"
detekt {
toolVersion = "1.0.0-RC12"
input = files("src/main/kotlin")
filters = ".*/resources/.*,.*/build/.*"
config = files("${project.rootDir}/default-detekt-config.yml")
}
}
subprojects {
ext {
add_test_dependencies = { Project p ->
p.dependencies {
testImplementation project(':library:unit-test-utils')
testImplementation KotlinTestDependencies.values
testImplementation NetworkTestDependencies.values
testImplementation TestDependencies.values
androidTestImplementation NetworkTestDependencies.values
kaptAndroidTest DaggerCompilerDependencies.values
androidTestImplementation AndroidTestDependencies.values
androidTestUtil AndroidTestUtilDependencies.values
}
}
CIBuild = System.getenv("CI") == "true"
// allows for -Dpre-dex=false to be set
preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Adagger.gradle.incremental"
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
}
afterEvaluate { project ->
if (project.hasProperty("android")) {
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
// Skip pre-dexing when running on CI or when disabled via -Dpre-dex=false.
preDexLibraries = preDexEnabled || CIBuild
}
adbOptions {
timeOutInMs = 5 * 60 * 1000
}
packagingOptions {
exclude 'META-INF/library_release.kotlin_module'
}
}
}
}
}