-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.gradle
More file actions
60 lines (56 loc) · 2.71 KB
/
build.gradle
File metadata and controls
60 lines (56 loc) · 2.71 KB
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
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "com.philliphsu.numberpadtimepickersample"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// The AndroidManifest in src/androidTest is not being merged correctly to the AndroidManifest
// in src/main. This is a workaround to use the androidTest manifest for all build variants
// with the debug build type. This is fine because we just don't want the additions in the
// androidTest manifest to be compiled under the release build type.
// https://stackoverflow.com/q/26244998/5055032
// https://stackoverflow.com/a/25427429/5055032
sourceSets {
debug {
manifest.srcFile 'src/androidTest/AndroidManifest.xml'
}
}
}
dependencies {
compile(project(':library')) {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
compile "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
compile "com.android.support:preference-v7:$rootProject.ext.supportLibraryVersion"
compile "com.android.support:preference-v14:$rootProject.ext.supportLibraryVersion"
compile "com.github.kizitonwose.colorpreference:support:$rootProject.ext.colorPreferenceVersion"
testCompile "junit:junit:$rootProject.ext.junitVersion"
// Excluding the 'support-annotations' module is necessary if you are targeting Marshmallow
// (since Espresso hasn't moved to Marshmallow yet).
// See:
// https://github.com/codepath/android_guides/wiki/UI-Testing-with-Espresso
// http://stackoverflow.com/a/36897759/5055032
androidTestCompile("com.android.support.test:runner:$rootProject.ext.runnerVersion") {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile("com.android.support.test:rules:$rootProject.ext.rulesVersion") {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile("com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion") {
exclude group: 'com.android.support', module: 'support-annotations'
}
}