From 51b7e5e751c193750c64edc5db6880e9ee7521db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Paczos?= Date: Tue, 18 Dec 2018 12:46:20 +0100 Subject: [PATCH 1/4] [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 -- .../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 7962589160e..82094c74f2d 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 2ccedf026e3..5d4508bb718 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 68d17b774da..05d92e5558d 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 e8f45392109..0b7448bce1a 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 86e4f4f5f81..9047bb5d960 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 be6c7814427..93174ecd865 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 00000000000..2b8128d2113 --- /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 c0315fed04f..c5e007c6cea 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 00000000000..796b778043d --- /dev/null +++ b/platform/android/vendor/mapbox-gestures-android @@ -0,0 +1 @@ +Subproject commit 796b778043d026eada8f6f02ba393db2d3b0027b From fac0357c05b514fb131a2ee3b44bf15580d21a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Paczos?= Date: Fri, 11 Jan 2019 11:27:16 +0100 Subject: [PATCH 2/4] [android] mapbox-java vendor --- .gitmodules | 3 +++ platform/android/MapboxGLAndroidSDK/build.gradle | 4 ++-- platform/android/MapboxGLAndroidSDKTestApp/build.gradle | 4 ++-- platform/android/gradle/dependencies.gradle | 6 ------ platform/android/settings.gradle | 7 +++++-- platform/android/vendor/mapbox-java | 1 + 6 files changed, 13 insertions(+), 12 deletions(-) create mode 160000 platform/android/vendor/mapbox-java diff --git a/.gitmodules b/.gitmodules index 82094c74f2d..ad26551fea0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -82,3 +82,6 @@ [submodule "platform/android/vendor/mapbox-gestures-android"] path = platform/android/vendor/mapbox-gestures-android url = https://github.com/mapbox/mapbox-gestures-android.git +[submodule "platform/android/vendor/mapbox-java"] + path = platform/android/vendor/mapbox-java + url = https://github.com/mapbox/mapbox-java.git diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle index 0b7448bce1a..7a421631401 100644 --- a/platform/android/MapboxGLAndroidSDK/build.gradle +++ b/platform/android/MapboxGLAndroidSDK/build.gradle @@ -5,9 +5,9 @@ apply plugin: 'kotlin-android' dependencies { lintChecks project(":MapboxGLAndroidSDKLint") api dependenciesList.mapboxAndroidTelemetry - api dependenciesList.mapboxJavaGeoJSON api project(":MapboxAndroidGestures") - implementation dependenciesList.mapboxJavaTurf + api project(":services-geojson") + implementation project(":services-turf") implementation dependenciesList.supportAppcompatV7 implementation dependenciesList.supportAnnotations implementation dependenciesList.supportFragmentV4 diff --git a/platform/android/MapboxGLAndroidSDKTestApp/build.gradle b/platform/android/MapboxGLAndroidSDKTestApp/build.gradle index 384c49eb7fa..a2a8bee22b4 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/build.gradle +++ b/platform/android/MapboxGLAndroidSDKTestApp/build.gradle @@ -57,8 +57,8 @@ android { dependencies { implementation dependenciesList.kotlinLib - implementation(project(':MapboxGLAndroidSDK')) - implementation(dependenciesList.mapboxJavaTurf) + implementation project(':MapboxGLAndroidSDK') + implementation project(":services-turf") implementation dependenciesList.supportAppcompatV7 implementation dependenciesList.supportRecyclerView diff --git a/platform/android/gradle/dependencies.gradle b/platform/android/gradle/dependencies.gradle index 93174ecd865..3e6f75c612f 100644 --- a/platform/android/gradle/dependencies.gradle +++ b/platform/android/gradle/dependencies.gradle @@ -8,7 +8,6 @@ ext { ] versions = [ - mapboxServices : '4.3.0', mapboxTelemetry : '4.1.1', supportLib : '27.1.1', constraintLayout: '1.1.2', @@ -28,13 +27,8 @@ ext { ] dependenciesList = [ - 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}", - // for testApp - mapboxJavaTurf : "com.mapbox.mapboxsdk:mapbox-sdk-turf:${versions.mapboxServices}", - junit : "junit:junit:${versions.junit}", mockito : "org.mockito:mockito-core:${versions.mockito}", mockk : "io.mockk:mockk:${versions.mockk}", diff --git a/platform/android/settings.gradle b/platform/android/settings.gradle index c5e007c6cea..4f13c802a8c 100644 --- a/platform/android/settings.gradle +++ b/platform/android/settings.gradle @@ -1,2 +1,5 @@ -include ':MapboxGLAndroidSDK', ':MapboxGLAndroidSDKTestApp', ':MapboxGLAndroidSDKLint', ':MapboxAndroidGestures' -project(':MapboxAndroidGestures').projectDir = new File('vendor/mapbox-gestures-android/library') \ No newline at end of file +include ':MapboxGLAndroidSDK', ':MapboxGLAndroidSDKTestApp', ':MapboxGLAndroidSDKLint', ':MapboxAndroidGestures', ':services-core', ':services-geojson', ':services-turf' +project(':MapboxAndroidGestures').projectDir = new File('vendor/mapbox-gestures-android/library') +project(':services-core').projectDir = new File('vendor/mapbox-java/services-core') +project(':services-geojson').projectDir = new File('vendor/mapbox-java/services-geojson') +project(':services-turf').projectDir = new File('vendor/mapbox-java/services-turf') \ No newline at end of file diff --git a/platform/android/vendor/mapbox-java b/platform/android/vendor/mapbox-java new file mode 160000 index 00000000000..0791fa4f00e --- /dev/null +++ b/platform/android/vendor/mapbox-java @@ -0,0 +1 @@ +Subproject commit 0791fa4f00efac2e3f9f95ed061b248580e9cf34 From ab7e7e04470fa1f9abe62d1dc61ff72790ba1984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Paczos?= Date: Fri, 11 Jan 2019 18:39:12 +0100 Subject: [PATCH 3/4] [android] mapbox-events-android vendor --- .gitmodules | 3 +++ platform/android/MapboxGLAndroidSDK/build.gradle | 3 ++- platform/android/gradle/dependencies.gradle | 3 --- platform/android/settings.gradle | 6 ++++-- platform/android/vendor/mapbox-events-android | 1 + 5 files changed, 10 insertions(+), 6 deletions(-) create mode 160000 platform/android/vendor/mapbox-events-android diff --git a/.gitmodules b/.gitmodules index ad26551fea0..9031496728d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -85,3 +85,6 @@ [submodule "platform/android/vendor/mapbox-java"] path = platform/android/vendor/mapbox-java url = https://github.com/mapbox/mapbox-java.git +[submodule "platform/android/vendor/mapbox-events-android"] + path = platform/android/vendor/mapbox-events-android + url = https://github.com/mapbox/mapbox-events-android.git diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle index 7a421631401..ae81203fc3b 100644 --- a/platform/android/MapboxGLAndroidSDK/build.gradle +++ b/platform/android/MapboxGLAndroidSDK/build.gradle @@ -4,7 +4,8 @@ apply plugin: 'kotlin-android' dependencies { lintChecks project(":MapboxGLAndroidSDKLint") - api dependenciesList.mapboxAndroidTelemetry + api project(":libcore") + api project(":libtelemetry") api project(":MapboxAndroidGestures") api project(":services-geojson") implementation project(":services-turf") diff --git a/platform/android/gradle/dependencies.gradle b/platform/android/gradle/dependencies.gradle index 3e6f75c612f..c044f4172b4 100644 --- a/platform/android/gradle/dependencies.gradle +++ b/platform/android/gradle/dependencies.gradle @@ -8,7 +8,6 @@ ext { ] versions = [ - mapboxTelemetry : '4.1.1', supportLib : '27.1.1', constraintLayout: '1.1.2', espresso : '3.0.2', @@ -27,8 +26,6 @@ ext { ] dependenciesList = [ - mapboxAndroidTelemetry : "com.mapbox.mapboxsdk:mapbox-android-telemetry:${versions.mapboxTelemetry}", - junit : "junit:junit:${versions.junit}", mockito : "org.mockito:mockito-core:${versions.mockito}", mockk : "io.mockk:mockk:${versions.mockk}", diff --git a/platform/android/settings.gradle b/platform/android/settings.gradle index 4f13c802a8c..b5fb30106d6 100644 --- a/platform/android/settings.gradle +++ b/platform/android/settings.gradle @@ -1,5 +1,7 @@ -include ':MapboxGLAndroidSDK', ':MapboxGLAndroidSDKTestApp', ':MapboxGLAndroidSDKLint', ':MapboxAndroidGestures', ':services-core', ':services-geojson', ':services-turf' +include ':MapboxGLAndroidSDK', ':MapboxGLAndroidSDKTestApp', ':MapboxGLAndroidSDKLint', ':MapboxAndroidGestures', ':services-core', ':services-geojson', ':services-turf', ':libtelemetry', ':libcore' project(':MapboxAndroidGestures').projectDir = new File('vendor/mapbox-gestures-android/library') project(':services-core').projectDir = new File('vendor/mapbox-java/services-core') project(':services-geojson').projectDir = new File('vendor/mapbox-java/services-geojson') -project(':services-turf').projectDir = new File('vendor/mapbox-java/services-turf') \ No newline at end of file +project(':services-turf').projectDir = new File('vendor/mapbox-java/services-turf') +project(':libtelemetry').projectDir = new File('vendor/mapbox-events-android/libtelemetry') +project(':libcore').projectDir = new File('vendor/mapbox-events-android/libcore') \ No newline at end of file diff --git a/platform/android/vendor/mapbox-events-android b/platform/android/vendor/mapbox-events-android new file mode 160000 index 00000000000..1e733ba20b9 --- /dev/null +++ b/platform/android/vendor/mapbox-events-android @@ -0,0 +1 @@ +Subproject commit 1e733ba20b9f0e5c2ec4ab624b84f87eaa5b9a84 From de12f59be8844584530b2b4388d7a408d732ce83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Paczos?= Date: Mon, 14 Jan 2019 16:44:48 +0100 Subject: [PATCH 4/4] [android] change vendor modules update script --- Makefile | 11 ++++++++--- circle.yml | 6 ------ platform/android/build.gradle | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 5d4508bb718..880abe1f99a 100644 --- a/Makefile +++ b/Makefile @@ -517,9 +517,14 @@ android-style-code: node platform/android/scripts/generate-style-code.js style-code: android-style-code +# Vendor submodules configuration for Android. +.PHONY: platform/android/vendor +platform/android/vendor: + git submodule update --init --recursive platform/android/vendor + # Configuration file for running CMake from Gradle within Android Studio. -platform/android/gradle/configuration.gradle: - @echo "ext {\n node = '`command -v node || command -v nodejs`'\n npm = '`command -v npm`'\n ccache = '`command -v ccache`'\n}" > $@ +platform/android/gradle/configuration.gradle: platform/android/vendor + @printf "ext {\n node = '`command -v node || command -v nodejs`'\n npm = '`command -v npm`'\n ccache = '`command -v ccache`'\n}" > $@ define ANDROID_RULES # $1 = arm-v7 (short arch) @@ -765,7 +770,7 @@ android-update-vendor: platform/android/gradle/configuration.gradle # Creates a dependency graph using Graphviz .PHONY: android-graph -android-graph: +android-graph: platform/android/gradle/configuration.gradle cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDK:generateDependencyGraphMapboxLibraries #### Miscellaneous targets ##################################################### diff --git a/circle.yml b/circle.yml index 05d92e5558d..68d17b774da 100644 --- a/circle.yml +++ b/circle.yml @@ -531,9 +531,6 @@ 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 @@ -595,9 +592,6 @@ 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/build.gradle b/platform/android/build.gradle index 9047bb5d960..b932188e77a 100644 --- a/platform/android/build.gradle +++ b/platform/android/build.gradle @@ -1,4 +1,5 @@ buildscript { + apply from: "${rootDir}/gradle/gradle-update-vendor-modules.gradle" apply from: "${rootDir}/gradle/dependencies.gradle" repositories { @@ -29,4 +30,3 @@ 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"