forked from mauron85/background-geolocation-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
96 lines (83 loc) · 3.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
apply plugin: 'com.android.library'
apply from: './VERSIONS.gradle'
def accountPrefix = getAccountPrefix()
def resourcePrefix = getResourcePrefix()
// https://hackernoon.com/android-how-to-add-gradle-dependencies-using-foreach-c4cbcc070458
def projDependencies = [
[configuration: "androidTestImplementation", dependency: androidLibs.supportAnnotations],
[configuration: "androidTestImplementation", dependency: testLibs.testRunner],
[configuration: "androidTestImplementation", dependency: testLibs.testRules],
[configuration: "testImplementation", dependency: testLibs.testRunner],
[configuration: "testImplementation", dependency: testLibs.testRules],
[configuration: "testImplementation", dependency: testLibs.junit],
[configuration: "testImplementation", dependency: testLibs.json],
[configuration: "testImplementation", dependency: testLibs.robolectric],
[configuration: "testImplementation", dependency: testLibs.mockitoCore],
[configuration: "implementation", dependency: androidLibs.playServicesLocation],
[configuration: "implementation", dependency: androidLibs.supportCompat],
[configuration: "implementation", dependency: androidLibs.appcompat],
[configuration: "implementation", dependency: libs.permissions,
options: { exclude group: 'com.android.support', module: 'appcompat-v7'}],
[configuration: "implementation", dependency: libs.logback],
[configuration: "implementation", dependency: libs.slf4j],
[configuration: "implementation", dependency: libs.promise],
]
buildscript {
repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
jcenter()
}
}
android {
compileSdkVersion project.ext.getCompileSdkVersion()
buildToolsVersion project.ext.getBuildToolsVersion()
// Tip: https://stackoverflow.com/questions/39987669/renamingdelegatingcontext-is-deprecated-how-do-we-test-sqlite-db-now/52170737#52170737
// Gradle automatically adds 'android.test.runner' as a dependency.
useLibrary 'android.test.runner'
useLibrary 'android.test.base'
useLibrary 'android.test.mock'
defaultConfig {
resValue "string", resourcePrefix + "account_name", 'Locations'
resValue "string", resourcePrefix + "account_type", accountPrefix + '.account'
resValue "string", resourcePrefix + "content_authority", accountPrefix + '.provider'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
minSdkVersion project.ext.getMinSdkVersion()
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions {
//unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
}
lintOptions {
abortOnError false
}
}
dependencies {
projDependencies.each {
add(it.configuration, it.dependency)
}
implementation fileTree(include: ['*.jar'], dir: 'libs')
}