/
build.gradle
130 lines (109 loc) · 3.88 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
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.mapbox.maps.token'
apply from: "${rootDir}/gradle/script-git-version.gradle"
apply from: "${rootDir}/gradle/ktlint.gradle"
android {
compileSdkVersion androidVersions.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
def getGitHash = { ->
try {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
} catch (Exception exception) {
return ""
}
}
defaultConfig {
applicationId "com.mapbox.navigation.examples"
minSdkVersion androidVersions.minSdkVersion
targetSdkVersion androidVersions.targetSdkVersion
multiDexEnabled true
versionCode gitVersionCode
versionName gitVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments clearPackageData: 'true'
vectorDrawables.useSupportLibrary = true
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
}
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
signingConfigs {
release {
keyAlias System.getenv("CIRCLECI_ANDROID_KEYSTORE_ALIAS")
keyPassword System.getenv("CIRCLECI_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
storeFile file("$project.rootDir/navigation_testapp.keystore")
storePassword System.getenv("CIRCLECI_ANDROID_KEYSTORE_PASSWORD")
}
}
buildTypes {
debug {
testCoverageEnabled = false
manifestPlaceholders = [enableCrashReporting: "false"]
}
release {
minifyEnabled true
signingConfig signingConfigs.release
manifestPlaceholders = [enableCrashReporting: "true"]
}
}
dexOptions {
maxProcessCount 8
javaMaxHeapSize "2g"
preDexLibraries true
}
lintOptions {
abortOnError false
}
}
dependencies {
// Mapbox Navigation SDK
implementation project(':libnavigation-metrics')
implementation project(':libnavigation-router')
implementation project(':libtrip-notification')
implementation project(':libnavigation-util')
implementation project(':libnavigator')
implementation project(':libnavigation-ui')
implementation dependenciesList.mapboxAndroidCommon
implementation dependenciesList.mapboxLogger
implementation dependenciesList.mapboxAnnotationPlugin
implementation dependenciesList.mapboxSdkTurf
// test
androidTestImplementation project(':libtesting-ui')
androidTestImplementation dependenciesList.testRunner
androidTestUtil dependenciesList.testOrchestrator
//ktlint
ktlint dependenciesList.ktlint
// Kotlin support
implementation dependenciesList.kotlinStdLib
//Coroutines
implementation dependenciesList.coroutinesAndroid
// Support libraries
implementation dependenciesList.androidXCore
implementation dependenciesList.materialDesign
implementation dependenciesList.androidXAppCompat
implementation dependenciesList.androidXConstraintLayout
implementation dependenciesList.gmsLocation
implementation dependenciesList.multidex
// Logging
implementation dependenciesList.timber
// Butter Knife
implementation dependenciesList.butterKnife
annotationProcessor dependenciesList.butterKnifeProcessor
// Leak Canary
debugImplementation dependenciesList.leakCanaryDebug
// Networking
implementation dependenciesList.mapboxSdkServices
implementation(dependenciesList.okhttp) {
force = true
}
}