-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
150 lines (124 loc) · 5.91 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
139
140
141
142
143
144
145
146
147
148
149
150
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
apply plugin: 'io.fabric'
// import gradle scripts
apply from: rootProject.file('buildsystem' + File.separator + 'private' + File.separator + 'private.gradle')
apply from: rootProject.file('buildsystem' + File.separator + 'methods.gradle')
apply from: rootProject.file('buildsystem' + File.separator + 'ci-helper.gradle')
// Add methods for adb standby and doze testing
apply from: rootProject.file('buildsystem' + File.separator + 'device.gradle')
apply from: rootProject.file('buildsystem' + File.separator + 'screenshot.gradle')
// Import Script for Publishing at Play Store
def playStore = "$rootDir/private/playstore.gradle"
if (file(playStore).exists()) {
apply from: playStore
}
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
signingConfigs {
config {
keyAlias appConfig["keyAlias"]
keyPassword appConfig["keyPassword"]
storeFile file(appConfig["storeFile"])
storePassword appConfig["storePassword"]
}
}
compileSdkVersion appSdkVersion
buildToolsVersion appBuildToolsVersion
defaultConfig {
applicationId applicationPackageId
minSdkVersion appMinSdkVersion
targetSdkVersion appSdkVersion
versionCode applicationVersionCode
versionName applicationVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// The following argument makes the Android Test Orchestrator run its
// "pm clear" command after each test invocation. This command ensures
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true'
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
}
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
unitTests.includeAndroidResources = true
}
// This enables long timeouts required on slow environments, e.g. Travis
adbOptions {
timeOutInMs 10 * 60 * 1000 // 10 minutes
// -g is for granting permissions when installing the app
// -r is to allow reinstalling of the app
installOptions "-d", "-t", "-g", "-r"
}
}
dependencies {
//implementation fileTree(include: ['*.jar'], dir: 'libs')
// App's dependencies, including test
implementation 'androidx.annotation:annotation:1.0.2'
// Google support components
implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
implementation 'androidx.preference:preference:1.1.0-alpha04'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha06'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha5'
// View Models
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.0.0'
testImplementation 'androidx.lifecycle:lifecycle-common-java8:2.0.0'
// Firebase and Crashlytics dependencies, also covers the analytics part
implementation 'com.google.firebase:firebase-core:16.0.8'
// https://firebase.google.com/docs/crashlytics/get-started#android
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.0'
// Open Source Notices
implementation 'com.google.android.gms:play-services-oss-licenses:16.0.2'
// For permissions
implementation 'gun0912.ted:tedpermission:2.2.2'
// Job Scheduler
implementation 'com.evernote:android-job:1.2.6'
testImplementation 'junit:junit:4.12'
// Testing-only dependencies
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// Core library
// Optional -- Robolectric environment
androidTestImplementation 'androidx.test:core:1.1.0'
// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.2.0-alpha05'
androidTestImplementation 'androidx.test:rules:1.2.0-alpha05'
// Assertions
// androidTestImplementation 'androidx.test.ext:junit:1.0.0'
// androidTestImplementation 'androidx.test.ext:truth:1.0.0'
// androidTestImplementation 'com.google.truth:truth:0.42'
// Espresso dependencies
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha05'
// androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.1-beta01'
// androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.1-beta01'
// androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.1.1-beta01'
// androidTestImplementation 'androidx.test.espresso:espresso-web:3.1.1-beta01'
// androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.1.1-beta01'
// The following Espresso dependency can be either "implementation"
// or "androidTestImplementation", depending on whether you want the
// dependency to appear on your APK's compile classpath or the test APK
// classpath.
// androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.1.1-beta01'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestUtil 'androidx.test:orchestrator:1.2.0-alpha05'
// For mocking objects
testImplementation 'org.mockito:mockito-core:2.8.9'
androidTestImplementation 'org.mockito:mockito-android:2.7.15'
}
// Apply the static analysis tools
apply from: rootProject.file('buildsystem' + File.separator + 'static-analysis.gradle')
// This should be at the bottom, in order to grab all project dependencies
apply plugin: 'com.google.gms.google-services'