[android] - cleaup dependencies.gradle
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
dependencies {
|
||||
api rootProject.ext.dep.mapboxAndroidTelemetry
|
||||
api rootProject.ext.dep.mapboxJavaGeoJSON
|
||||
implementation rootProject.ext.dep.supportAnnotations
|
||||
implementation rootProject.ext.dep.supportFragmentV4
|
||||
implementation rootProject.ext.dep.timber
|
||||
implementation rootProject.ext.dep.okhttp3
|
||||
compileOnly(rootProject.ext.dep.lost) {
|
||||
api dependenciesList.mapboxAndroidTelemetry
|
||||
api dependenciesList.mapboxJavaGeoJSON
|
||||
implementation dependenciesList.supportAnnotations
|
||||
implementation dependenciesList.supportFragmentV4
|
||||
implementation dependenciesList.timber
|
||||
implementation dependenciesList.okhttp3
|
||||
compileOnly(dependenciesList.lost) {
|
||||
exclude group: 'com.google.guava'
|
||||
exclude group: 'com.android.support'
|
||||
}
|
||||
testImplementation rootProject.ext.dep.lost
|
||||
testImplementation rootProject.ext.dep.junit
|
||||
testImplementation rootProject.ext.dep.mockito
|
||||
testImplementation rootProject.ext.dep.robolectric
|
||||
testImplementation dependenciesList.lost
|
||||
testImplementation dependenciesList.junit
|
||||
testImplementation dependenciesList.mockito
|
||||
testImplementation dependenciesList.robolectric
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
compileSdkVersion androidVersions.compileSdkVersion
|
||||
buildToolsVersion androidVersions.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
minSdkVersion androidVersions.minSdkVersion
|
||||
targetSdkVersion androidVersions.targetSdkVersion
|
||||
buildConfigField "String", "GIT_REVISION_SHORT", String.format("\"%s\"", getGitRevision())
|
||||
buildConfigField "String", "MAPBOX_VERSION_STRING", String.format("\"Mapbox/%s\"", project.VERSION_NAME)
|
||||
buildConfigField "String", "MAPBOX_EVENTS_USER_AGENT", String.format("\"MapboxEventsAndroid/%s\"", project.VERSION_NAME)
|
||||
@@ -64,12 +64,12 @@ android {
|
||||
arguments "-DANDROID_CPP_FEATURES=rtti;exceptions"
|
||||
arguments "-DMBGL_PLATFORM=android"
|
||||
arguments "-DMASON_PLATFORM=android"
|
||||
arguments "-DNodeJS_EXECUTABLE=" + rootProject.ext.node
|
||||
arguments "-Dnpm_EXECUTABLE=" + rootProject.ext.npm
|
||||
arguments "-DNodeJS_EXECUTABLE=" + node
|
||||
arguments "-Dnpm_EXECUTABLE=" + npm
|
||||
|
||||
// Enable ccache if the user has installed it.
|
||||
if (rootProject.ext.ccache?.trim()) {
|
||||
arguments "-DANDROID_CCACHE=" + rootProject.ext.ccache
|
||||
if (ccache?.trim()) {
|
||||
arguments "-DANDROID_CCACHE=" + ccache
|
||||
// ccache splits up the compile command until multiple invocations and uses -E
|
||||
// with one of them, and clang doesn't like unused arguments in that case.
|
||||
cFlags "-Qunused-arguments"
|
||||
@@ -121,7 +121,7 @@ android {
|
||||
|
||||
testOptions {
|
||||
unitTests {
|
||||
returnDefaultValues = true
|
||||
returnDefaultValues true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,15 +129,10 @@ android {
|
||||
debug {
|
||||
jniDebuggable true
|
||||
}
|
||||
|
||||
release {
|
||||
// aar proguard configuration
|
||||
jniDebuggable false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def getGitRevision() {
|
||||
def static getGitRevision() {
|
||||
def cmd = "git rev-parse --short HEAD"
|
||||
def proc = cmd.execute()
|
||||
def ref = proc.text.trim()
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
compileSdkVersion androidVersions.compileSdkVersion
|
||||
buildToolsVersion androidVersions.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.mapbox.mapboxsdk.testapp"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode rootProject.ext.versionCode
|
||||
versionName rootProject.ext.versionName
|
||||
minSdkVersion androidVersions.minSdkVersion
|
||||
targetSdkVersion androidVersions.targetSdkVersion
|
||||
versionCode 12
|
||||
versionName "6.0.0"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -53,31 +53,24 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation(project(':MapboxGLAndroidSDK'))
|
||||
|
||||
// Support libraries
|
||||
implementation rootProject.ext.dep.supportAppcompatV7
|
||||
implementation rootProject.ext.dep.supportRecyclerView
|
||||
implementation rootProject.ext.dep.supportDesign
|
||||
|
||||
// Leak Canary
|
||||
debugImplementation rootProject.ext.dep.leakCanaryDebug
|
||||
releaseImplementation rootProject.ext.dep.leakCanaryRelease
|
||||
|
||||
// Timber
|
||||
implementation rootProject.ext.dep.timber
|
||||
|
||||
// Mapbox Android Services (Java component)
|
||||
implementation(rootProject.ext.dep.mapboxJavaServices) {
|
||||
implementation(dependenciesList.mapboxJavaServices) {
|
||||
transitive = true
|
||||
}
|
||||
implementation rootProject.ext.dep.lost
|
||||
|
||||
// Testing dependencies
|
||||
androidTestImplementation rootProject.ext.dep.supportAnnotations
|
||||
androidTestImplementation rootProject.ext.dep.testRunner
|
||||
androidTestImplementation rootProject.ext.dep.testRules
|
||||
androidTestImplementation rootProject.ext.dep.testEspressoCore
|
||||
androidTestImplementation rootProject.ext.dep.testEspressoIntents
|
||||
implementation dependenciesList.supportAppcompatV7
|
||||
implementation dependenciesList.supportRecyclerView
|
||||
implementation dependenciesList.supportDesign
|
||||
|
||||
implementation dependenciesList.lost
|
||||
implementation dependenciesList.timber
|
||||
debugImplementation dependenciesList.leakCanaryDebug
|
||||
releaseImplementation dependenciesList.leakCanaryRelease
|
||||
|
||||
androidTestImplementation dependenciesList.supportAnnotations
|
||||
androidTestImplementation dependenciesList.testRunner
|
||||
androidTestImplementation dependenciesList.testRules
|
||||
androidTestImplementation dependenciesList.testEspressoCore
|
||||
androidTestImplementation dependenciesList.testEspressoIntents
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/gradle-make.gradle"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
buildscript {
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
@@ -16,8 +17,8 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
gradleVersion = '3.2.1'
|
||||
subprojects {
|
||||
apply from: "${rootDir}/gradle/dependencies.gradle"
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/dependencies.gradle"
|
||||
|
||||
@@ -1,49 +1,50 @@
|
||||
ext {
|
||||
minSdkVersion = 14
|
||||
targetSdkVersion = 25
|
||||
compileSdkVersion = 25
|
||||
buildToolsVersion = "26.0.3"
|
||||
|
||||
versionCode = 12
|
||||
versionName = "6.0.0"
|
||||
androidVersions = [
|
||||
minSdkVersion : 14,
|
||||
targetSdkVersion : 25,
|
||||
compileSdkVersion: 25,
|
||||
buildToolsVersion: '26.0.3'
|
||||
]
|
||||
|
||||
mapboxServicesVersion = "2.2.9"
|
||||
supportLibVersion = "25.4.0"
|
||||
espressoVersion = '3.0.1'
|
||||
testRunnerVersion = '1.0.1'
|
||||
leakCanaryVersion = '1.5.1'
|
||||
versions = [
|
||||
mapboxServices: '2.2.9',
|
||||
supportLib : '25.4.0',
|
||||
espresso : '3.0.1',
|
||||
testRunner : '1.0.1',
|
||||
leakCanary : '1.5.1',
|
||||
lost : '3.0.4',
|
||||
junit : '4.12',
|
||||
mockito : '2.10.0',
|
||||
robolectric : '3.5.1',
|
||||
timber : '4.5.1',
|
||||
okhttp : '3.9.1'
|
||||
]
|
||||
|
||||
dep = [
|
||||
// mapbox
|
||||
mapboxJavaServices : "com.mapbox.mapboxsdk:mapbox-java-services:${mapboxServicesVersion}@jar",
|
||||
mapboxJavaGeoJSON : "com.mapbox.mapboxsdk:mapbox-java-geojson:${mapboxServicesVersion}@jar",
|
||||
mapboxAndroidTelemetry : "com.mapbox.mapboxsdk:mapbox-android-telemetry:${mapboxServicesVersion}@aar",
|
||||
dependenciesList = [
|
||||
mapboxJavaServices : "com.mapbox.mapboxsdk:mapbox-java-services:${versions.mapboxServices}@jar",
|
||||
mapboxJavaGeoJSON : "com.mapbox.mapboxsdk:mapbox-java-geojson:${versions.mapboxServices}@jar",
|
||||
mapboxAndroidTelemetry: "com.mapbox.mapboxsdk:mapbox-android-telemetry:${versions.mapboxServices}@aar",
|
||||
|
||||
// mapzen lost
|
||||
lost : 'com.mapzen.android:lost:3.0.4',
|
||||
junit : "junit:junit:${versions.junit}",
|
||||
mockito : "org.mockito:mockito-core:${versions.mockito}",
|
||||
robolectric : "org.robolectric:robolectric:${versions.robolectric}",
|
||||
|
||||
// unit test
|
||||
junit : 'junit:junit:4.12',
|
||||
mockito : 'org.mockito:mockito-core:2.10.0',
|
||||
robolectric : 'org.robolectric:robolectric:3.5.1',
|
||||
testRunner : "com.android.support.test:runner:${versions.testRunner}",
|
||||
testRules : "com.android.support.test:rules:${versions.testRunner}",
|
||||
testEspressoCore : "com.android.support.test.espresso:espresso-core:${versions.espresso}",
|
||||
testEspressoIntents : "com.android.support.test.espresso:espresso-intents:${versions.espresso}",
|
||||
|
||||
// instrumentation test
|
||||
testRunner : "com.android.support.test:runner:${testRunnerVersion}",
|
||||
testRules : "com.android.support.test:rules:${testRunnerVersion}",
|
||||
testEspressoCore : "com.android.support.test.espresso:espresso-core:${espressoVersion}",
|
||||
testEspressoIntents : "com.android.support.test.espresso:espresso-intents:${espressoVersion}",
|
||||
supportAnnotations : "com.android.support:support-annotations:${versions.supportLib}",
|
||||
supportAppcompatV7 : "com.android.support:appcompat-v7:${versions.supportLib}",
|
||||
supportFragmentV4 : "com.android.support:support-fragment:${versions.supportLib}",
|
||||
supportDesign : "com.android.support:design:${versions.supportLib}",
|
||||
supportRecyclerView : "com.android.support:recyclerview-v7:${versions.supportLib}",
|
||||
|
||||
// support
|
||||
supportAnnotations : "com.android.support:support-annotations:${supportLibVersion}",
|
||||
supportAppcompatV7 : "com.android.support:appcompat-v7:${supportLibVersion}",
|
||||
supportFragmentV4 : "com.android.support:support-fragment:${supportLibVersion}",
|
||||
supportDesign : "com.android.support:design:${supportLibVersion}",
|
||||
supportRecyclerView : "com.android.support:recyclerview-v7:${supportLibVersion}",
|
||||
|
||||
// square crew
|
||||
timber : 'com.jakewharton.timber:timber:4.5.1',
|
||||
okhttp3 : 'com.squareup.okhttp3:okhttp:3.9.1',
|
||||
leakCanaryDebug : "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}",
|
||||
leakCanaryRelease : "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
|
||||
lost : "com.mapzen.android:lost:${versions.lost}",
|
||||
timber : "com.jakewharton.timber:timber:${versions.timber}",
|
||||
okhttp3 : "com.squareup.okhttp3:okhttp:${versions.okhttp}",
|
||||
leakCanaryDebug : "com.squareup.leakcanary:leakcanary-android:${versions.leakCanary}",
|
||||
leakCanaryRelease : "com.squareup.leakcanary:leakcanary-android-no-op:${versions.leakCanary}"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user