-
Notifications
You must be signed in to change notification settings - Fork 8.3k
/
build.gradle
129 lines (114 loc) · 4 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
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-allopen'
apply plugin: 'androidx.navigation.safeargs.kotlin'
allOpen {
// allows mocking for classes w/o directly opening them for release builds
annotation 'com.android.example.github.testing.OpenClass'
}
android {
compileSdkVersion build_versions.compile_sdk
defaultConfig {
applicationId "com.android.example.github"
minSdkVersion 21
targetSdkVersion build_versions.target_sdk
versionCode 1
versionName "1.0"
testInstrumentationRunner "com.android.example.github.util.GithubTestRunner"
}
buildTypes {
debug {
testCoverageEnabled !project.hasProperty('android.injected.invoked.from.ide')
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
sourceSets {
androidTest.java.srcDirs += "src/test-common/java"
test.java.srcDirs += "src/test-common/java"
}
lintOptions {
lintConfig rootProject.file('lint.xml')
disable 'InvalidPackage'
}
}
dependencies {
implementation deps.app_compat
implementation deps.recyclerview
implementation deps.cardview
implementation deps.material
implementation deps.core_ktx
implementation deps.transition
implementation deps.fragment.testing
implementation deps.atsl.core
implementation deps.navigation.fragment_ktx
implementation deps.room.runtime
implementation deps.lifecycle.livedata_ktx
implementation deps.lifecycle.runtime
implementation deps.lifecycle.java8
implementation deps.retrofit.runtime
implementation deps.retrofit.gson
implementation deps.glide.runtime
implementation deps.dagger.runtime
implementation deps.dagger.android
implementation deps.dagger.android_support
implementation deps.constraint_layout
implementation deps.kotlin.stdlib
implementation deps.timber
kapt deps.dagger.android_support_compiler
kapt deps.dagger.compiler
kapt deps.room.compiler
kapt deps.lifecycle.compiler
testImplementation deps.atsl.core
testImplementation deps.junit
testImplementation deps.mock_web_server
testImplementation deps.arch_core.testing
testImplementation deps.mockito.core
androidTestImplementation deps.atsl.core
androidTestImplementation deps.atsl.ext_junit
androidTestImplementation deps.atsl.runner
androidTestImplementation deps.atsl.rules
androidTestImplementation deps.app_compat
androidTestImplementation deps.recyclerview
androidTestImplementation deps.cardview
androidTestImplementation deps.material
androidTestImplementation deps.espresso.core
androidTestImplementation deps.espresso.contrib
androidTestImplementation deps.arch_core.testing
androidTestImplementation deps.mockito.core
androidTestImplementation deps.mockito.android
}
// we need all open to run tests which we enable only for debug builds.
project.tasks.whenTaskAdded {
if (it.name == "testReleaseUnitTest") {
it.enabled = false
}
}