From d617b87b4de99b2dc31102032d29a6cabd2fe7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Paczos?= Date: Tue, 18 Dec 2018 12:46:20 +0100 Subject: [android] mapbox-gestures-android vendor --- .gitmodules | 3 +++ Makefile | 7 ++++++- circle.yml | 6 ++++++ platform/android/MapboxGLAndroidSDK/build.gradle | 2 +- platform/android/build.gradle | 1 + platform/android/gradle/dependencies.gradle | 2 -- platform/android/gradle/gradle-update-vendor-modules.gradle | 3 +++ platform/android/settings.gradle | 3 ++- platform/android/vendor/mapbox-gestures-android | 1 + 9 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 platform/android/gradle/gradle-update-vendor-modules.gradle create mode 160000 platform/android/vendor/mapbox-gestures-android diff --git a/.gitmodules b/.gitmodules index 7962589160..82094c74f2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -79,3 +79,6 @@ [submodule "vendor/eternal"] path = vendor/eternal url = https://github.com/mapbox/eternal.git +[submodule "platform/android/vendor/mapbox-gestures-android"] + path = platform/android/vendor/mapbox-gestures-android + url = https://github.com/mapbox/mapbox-gestures-android.git diff --git a/Makefile b/Makefile index 2ccedf026e..5d4508bb71 100644 --- a/Makefile +++ b/Makefile @@ -719,7 +719,7 @@ android-check : android-checkstyle android-lint-sdk android-lint-test-app # Runs checkstyle on the Android code .PHONY: android-checkstyle android-checkstyle: platform/android/gradle/configuration.gradle - cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none checkstyle + cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDK:checkstyle :MapboxGLAndroidSDKTestApp:checkstyle # Runs lint on the Android SDK code .PHONY: android-lint-sdk @@ -758,6 +758,11 @@ endif android-configuration: platform/android/gradle/configuration.gradle cat platform/android/gradle/configuration.gradle +# Updates Android's vendor submodules +.PHONY: android-update-vendor +android-update-vendor: platform/android/gradle/configuration.gradle + cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none updateVendorSubmodules + # Creates a dependency graph using Graphviz .PHONY: android-graph android-graph: diff --git a/circle.yml b/circle.yml index 68d17b774d..05d92e5558 100644 --- a/circle.yml +++ b/circle.yml @@ -531,6 +531,9 @@ jobs: MBGL_ANDROID_STL: << parameters.stl >> steps: - install-dependencies: { gradle: true } + - run: + name: Update vendor submodules + command: make android-update-vendor - run: name: Check code style command: make android-check @@ -592,6 +595,9 @@ jobs: IS_LOCAL_DEVELOPMENT: false steps: - install-dependencies: { gradle: true } + - run: + name: Update vendor submodules + command: make android-update-vendor - run: name: Generate Maven credentials command: | diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle index 5e7347e3f2..8be7e87883 100644 --- a/platform/android/MapboxGLAndroidSDK/build.gradle +++ b/platform/android/MapboxGLAndroidSDK/build.gradle @@ -6,7 +6,7 @@ dependencies { lintChecks project(":MapboxGLAndroidSDKLint") api dependenciesList.mapboxAndroidTelemetry api dependenciesList.mapboxJavaGeoJSON - api dependenciesList.mapboxAndroidGestures + api project(":MapboxAndroidGestures") implementation dependenciesList.mapboxJavaTurf implementation dependenciesList.supportAppcompatV7 implementation dependenciesList.supportAnnotations diff --git a/platform/android/build.gradle b/platform/android/build.gradle index 86e4f4f5f8..9047bb5d96 100644 --- a/platform/android/build.gradle +++ b/platform/android/build.gradle @@ -29,3 +29,4 @@ subprojects { // Load build system information. If this file does not exist, run // `make platform/android/gradle/configuration.gradle` apply from: "${rootDir}/gradle/configuration.gradle" +apply from: "${rootDir}/gradle/gradle-update-vendor-modules.gradle" diff --git a/platform/android/gradle/dependencies.gradle b/platform/android/gradle/dependencies.gradle index be6c781442..93174ecd86 100644 --- a/platform/android/gradle/dependencies.gradle +++ b/platform/android/gradle/dependencies.gradle @@ -10,7 +10,6 @@ ext { versions = [ mapboxServices : '4.3.0', mapboxTelemetry : '4.1.1', - mapboxGestures : '0.3.0', supportLib : '27.1.1', constraintLayout: '1.1.2', espresso : '3.0.2', @@ -32,7 +31,6 @@ ext { mapboxJavaServices : "com.mapbox.mapboxsdk:mapbox-sdk-services:${versions.mapboxServices}", mapboxJavaGeoJSON : "com.mapbox.mapboxsdk:mapbox-sdk-geojson:${versions.mapboxServices}", mapboxAndroidTelemetry : "com.mapbox.mapboxsdk:mapbox-android-telemetry:${versions.mapboxTelemetry}", - mapboxAndroidGestures : "com.mapbox.mapboxsdk:mapbox-android-gestures:${versions.mapboxGestures}", // for testApp mapboxJavaTurf : "com.mapbox.mapboxsdk:mapbox-sdk-turf:${versions.mapboxServices}", diff --git a/platform/android/gradle/gradle-update-vendor-modules.gradle b/platform/android/gradle/gradle-update-vendor-modules.gradle new file mode 100644 index 0000000000..2b8128d211 --- /dev/null +++ b/platform/android/gradle/gradle-update-vendor-modules.gradle @@ -0,0 +1,3 @@ +task updateVendorSubmodules { + "git submodule update --init --recursive vendor".execute() +} \ No newline at end of file diff --git a/platform/android/settings.gradle b/platform/android/settings.gradle index c0315fed04..c5e007c6ce 100644 --- a/platform/android/settings.gradle +++ b/platform/android/settings.gradle @@ -1 +1,2 @@ -include ':MapboxGLAndroidSDK', ':MapboxGLAndroidSDKTestApp', ':MapboxGLAndroidSDKLint' \ No newline at end of file +include ':MapboxGLAndroidSDK', ':MapboxGLAndroidSDKTestApp', ':MapboxGLAndroidSDKLint', ':MapboxAndroidGestures' +project(':MapboxAndroidGestures').projectDir = new File('vendor/mapbox-gestures-android/library') \ No newline at end of file diff --git a/platform/android/vendor/mapbox-gestures-android b/platform/android/vendor/mapbox-gestures-android new file mode 160000 index 0000000000..796b778043 --- /dev/null +++ b/platform/android/vendor/mapbox-gestures-android @@ -0,0 +1 @@ +Subproject commit 796b778043d026eada8f6f02ba393db2d3b0027b -- cgit v1.2.1