Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - bump gradle syntax to 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Dec 19, 2017
1 parent 46479a9 commit e282b10
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 42 deletions.
12 changes: 6 additions & 6 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
28 changes: 10 additions & 18 deletions platform/android/MapboxGLAndroidSDK/build.gradle
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
31 changes: 16 additions & 15 deletions platform/android/MapboxGLAndroidSDKTestApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
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;
Expand All @@ -40,11 +38,11 @@

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;
Expand Down

0 comments on commit e282b10

Please sign in to comment.