[android] - bump gradle syntax to 4.1

This commit is contained in:
Tobrun
2017-11-23 14:32:35 +01:00
committed by Tobrun
parent 1b0a5f633a
commit 228aadc07e
4 changed files with 33 additions and 42 deletions

View File

@@ -301,22 +301,22 @@ jobs:
command: |
gcloud firebase test android models list
(gcloud firebase test android run --type instrumentation \
--app platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/MapboxGLAndroidSDKTestApp-debug.apk \
--test platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/MapboxGLAndroidSDKTestApp-debug-androidTest.apk \
--app platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/debug/MapboxGLAndroidSDKTestApp-debug.apk \
--test platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/androidTest/debug/MapboxGLAndroidSDKTestApp-debug-androidTest.apk \
--device-ids shamu --os-version-ids 22 --locales en --orientations portrait --timeout 20m \
2>&1 | tee firebase.log) || EXIT_CODE=$?
FIREBASE_TEST_BUCKET=$(sed -n 's|^.*\[https://console.developers.google.com/storage/browser/\([^]]*\).*|gs://\1|p' firebase.log)
echo "Downloading from: ${FIREBASE_TEST_BUCKET}"
gsutil -m cp -n -R -Z "$FIREBASE_TEST_BUCKET*" platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk
gsutil -m cp -n -R -Z "$FIREBASE_TEST_BUCKET*" platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/debug
echo "Try running ndk-stack on downloaded logcat to symbolicate the stacktraces:"
find platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk -type f -name "logcat" -print0 | \
find platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/debug -type f -name "logcat" -print0 | \
xargs -0 -I '{}' ${ANDROID_NDK_HOME}/ndk-stack -sym build/android-arm-v7/Debug -dump {}
exit ${EXIT_CODE:-0}
- store_artifacts:
path: platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk
path: platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/debug
destination: .
- store_artifacts:
path: platform/android/MapboxGLAndroidSDK/build/reports/lint-results.html
@@ -365,7 +365,7 @@ jobs:
- *save-cache
- *save-gradle-cache
- store_artifacts:
path: platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk
path: platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/release
destination: .
- deploy:
name: Show statistics

View File

@@ -1,27 +1,19 @@
apply plugin: 'com.android.library'
dependencies {
compile rootProject.ext.dep.supportAnnotations
compile rootProject.ext.dep.supportFragmentV4
compile rootProject.ext.dep.timber
compile rootProject.ext.dep.okhttp3
provided(rootProject.ext.dep.lost) {
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) {
exclude group: 'com.google.guava'
exclude group: 'com.android.support'
}
testCompile rootProject.ext.dep.junit
testCompile rootProject.ext.dep.mockito
// Mapbox Android Services (GeoJSON support)
compile(rootProject.ext.dep.mapboxJavaGeoJSON) {
transitive = true
}
// Mapbox Android Services (Telemetry support)
compile(rootProject.ext.dep.mapboxAndroidTelemetry) {
transitive = true
exclude group: 'com.android.support'
}
testImplementation rootProject.ext.dep.lost
testImplementation rootProject.ext.dep.junit
testImplementation rootProject.ext.dep.mockito
}
android {

View File

@@ -52,31 +52,32 @@ android {
}
dependencies {
compile(project(':MapboxGLAndroidSDK')) {
transitive = true
}
implementation(project(':MapboxGLAndroidSDK'))
// Support libraries
compile rootProject.ext.dep.supportAppcompatV7
compile rootProject.ext.dep.supportRecyclerView
compile rootProject.ext.dep.supportDesign
implementation rootProject.ext.dep.supportAppcompatV7
implementation rootProject.ext.dep.supportRecyclerView
implementation rootProject.ext.dep.supportDesign
// Leak Canary
debugCompile rootProject.ext.dep.leakCanaryDebug
releaseCompile rootProject.ext.dep.leakCanaryRelease
debugImplementation rootProject.ext.dep.leakCanaryDebug
releaseImplementation rootProject.ext.dep.leakCanaryRelease
// Timber
implementation rootProject.ext.dep.timber
// Mapbox Android Services (Java component)
compile(rootProject.ext.dep.mapboxJavaServices) {
implementation(rootProject.ext.dep.mapboxJavaServices) {
transitive = true
}
compile rootProject.ext.dep.lost
implementation rootProject.ext.dep.lost
// Testing dependencies
androidTestCompile rootProject.ext.dep.supportAnnotations
androidTestCompile rootProject.ext.dep.testRunner
androidTestCompile rootProject.ext.dep.testRules
androidTestCompile rootProject.ext.dep.testEspressoCore
androidTestCompile rootProject.ext.dep.testEspressoIntents
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
}
apply from: 'gradle-make.gradle'

View File

@@ -12,8 +12,6 @@ import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.maps.MapView;
import com.mapbox.mapboxsdk.maps.MapboxMap;
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
import com.mapbox.mapboxsdk.style.layers.CircleLayer;
import com.mapbox.mapboxsdk.style.layers.FillLayer;
import com.mapbox.mapboxsdk.style.layers.Layer;
@@ -40,11 +38,11 @@ import java.util.List;
import timber.log.Timber;
import static com.mapbox.mapboxsdk.style.expressions.Expression.color;
import static com.mapbox.mapboxsdk.style.expressions.Expression.exponential;
import static com.mapbox.mapboxsdk.style.expressions.Expression.interpolate;
import static com.mapbox.mapboxsdk.style.expressions.Expression.stop;
import static com.mapbox.mapboxsdk.style.expressions.Expression.zoom;
import static com.mapbox.mapboxsdk.style.expressions.Expression.color;
import static com.mapbox.mapboxsdk.style.layers.Filter.all;
import static com.mapbox.mapboxsdk.style.layers.Filter.eq;
import static com.mapbox.mapboxsdk.style.layers.Filter.gte;