[android] revert modules vendorization and keep submodules only
This commit is contained in:
committed by
Łukasz Paczos
parent
472e61da39
commit
ca8625fba1
12
Makefile
12
Makefile
@@ -517,13 +517,8 @@ 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: platform/android/vendor
|
||||
platform/android/gradle/configuration.gradle:
|
||||
@printf "ext {\n node = '`command -v node || command -v nodejs`'\n npm = '`command -v npm`'\n ccache = '`command -v ccache`'\n}" > $@
|
||||
|
||||
define ANDROID_RULES
|
||||
@@ -763,11 +758,6 @@ 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: platform/android/gradle/configuration.gradle
|
||||
|
||||
@@ -18,6 +18,18 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens
|
||||
|
||||
===========================================================================
|
||||
|
||||
Mapbox GL uses portions of the Android Lifecycle Extensions.
|
||||
URL: [https://developer.android.com/topic/libraries/architecture/index.html](https://developer.android.com/topic/libraries/architecture/index.html)
|
||||
License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
|
||||
|
||||
===========================================================================
|
||||
|
||||
Mapbox GL uses portions of the Android Lifecycle LiveData.
|
||||
URL: [https://developer.android.com/topic/libraries/architecture/index.html](https://developer.android.com/topic/libraries/architecture/index.html)
|
||||
License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
|
||||
|
||||
===========================================================================
|
||||
|
||||
Mapbox GL uses portions of the Android Lifecycle LiveData Core.
|
||||
URL: [https://developer.android.com/topic/libraries/architecture/index.html](https://developer.android.com/topic/libraries/architecture/index.html)
|
||||
License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
|
||||
@@ -94,6 +106,42 @@ License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
|
||||
|
||||
===========================================================================
|
||||
|
||||
Mapbox GL uses portions of the Mapbox Android Core Library.
|
||||
URL: [https://github.com/mapbox/mapbox-events-android](https://github.com/mapbox/mapbox-events-android)
|
||||
License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
|
||||
|
||||
===========================================================================
|
||||
|
||||
Mapbox GL uses portions of the Mapbox Android Gestures Library.
|
||||
URL: [https://github.com/mapbox/mapbox-gestures-android](https://github.com/mapbox/mapbox-gestures-android)
|
||||
License: [BSD 2-Clause "Simplified" License](https://raw.githubusercontent.com/mapbox/mapbox-gestures-android/master/LICENSE.md)
|
||||
|
||||
===========================================================================
|
||||
|
||||
Mapbox GL uses portions of the Mapbox Android Telemetry Library.
|
||||
URL: [https://github.com/mapbox/mapbox-events-android](https://github.com/mapbox/mapbox-events-android)
|
||||
License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
|
||||
|
||||
===========================================================================
|
||||
|
||||
Mapbox GL uses portions of the Mapbox Services SDK.
|
||||
URL: [https://github.com/mapbox/mapbox-java](https://github.com/mapbox/mapbox-java)
|
||||
License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
|
||||
|
||||
===========================================================================
|
||||
|
||||
Mapbox GL uses portions of the Mapbox Services SDK.
|
||||
URL: [https://github.com/mapbox/mapbox-java](https://github.com/mapbox/mapbox-java)
|
||||
License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
|
||||
|
||||
===========================================================================
|
||||
|
||||
Mapbox GL uses portions of the Mapbox Services SDK.
|
||||
URL: [https://github.com/mapbox/mapbox-java](https://github.com/mapbox/mapbox-java)
|
||||
License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
|
||||
|
||||
===========================================================================
|
||||
|
||||
Mapbox GL uses portions of the OkHttp.
|
||||
License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
|
||||
|
||||
|
||||
@@ -4,11 +4,13 @@ apply plugin: 'kotlin-android'
|
||||
|
||||
dependencies {
|
||||
lintChecks project(":MapboxGLAndroidSDKLint")
|
||||
api project(":libcore")
|
||||
api project(":libtelemetry")
|
||||
api project(":MapboxAndroidGestures")
|
||||
api project(":services-geojson")
|
||||
implementation project(":services-turf")
|
||||
api dependenciesList.mapboxAndroidTelemetry
|
||||
api dependenciesList.mapboxJavaGeoJSON
|
||||
api (dependenciesList.mapboxAndroidGestures) {
|
||||
// workaround until https://github.com/mapbox/mapbox-gestures-android/issues/50 is released
|
||||
exclude group: 'com.jakewharton.timber', module: 'timber'
|
||||
}
|
||||
implementation dependenciesList.mapboxJavaTurf
|
||||
implementation dependenciesList.supportAppcompatV7
|
||||
implementation dependenciesList.supportAnnotations
|
||||
implementation dependenciesList.supportFragmentV4
|
||||
|
||||
@@ -57,7 +57,7 @@ dependencies {
|
||||
implementation dependenciesList.kotlinLib
|
||||
|
||||
implementation project(':MapboxGLAndroidSDK')
|
||||
implementation project(":services-turf")
|
||||
implementation dependenciesList.mapboxJavaTurf
|
||||
|
||||
implementation dependenciesList.supportAppcompatV7
|
||||
implementation dependenciesList.supportRecyclerView
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
buildscript {
|
||||
apply from: "${rootDir}/gradle/gradle-update-vendor-modules.gradle"
|
||||
apply from: "${rootDir}/gradle/dependencies.gradle"
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -7,6 +7,9 @@ ext {
|
||||
]
|
||||
|
||||
versions = [
|
||||
mapboxServices : '4.3.0',
|
||||
mapboxTelemetry : '4.2.0',
|
||||
mapboxGestures : '0.3.0',
|
||||
supportLib : '27.1.1',
|
||||
constraintLayout: '1.1.2',
|
||||
espresso : '3.0.2',
|
||||
@@ -25,23 +28,15 @@ ext {
|
||||
reLinker : '1.3.1'
|
||||
]
|
||||
|
||||
vendorArtifacts = [
|
||||
mapboxGestures : 'mapbox-android-gestures',
|
||||
mapboxJavaCore : 'mapbox-sdk-core',
|
||||
mapboxJavaTurf : 'mapbox-sdk-turf',
|
||||
mapboxJavaGeojson: 'mapbox-sdk-geojson',
|
||||
mapboxTelemetry : 'mapbox-android-telemetry',
|
||||
mapboxAndroidCore: 'mapbox-android-core'
|
||||
]
|
||||
|
||||
vendorVersions = [
|
||||
mapboxGestures : '0.3.0',
|
||||
mapboxJava : '4.3.0',
|
||||
mapboxTelemetry : '4.2.0',
|
||||
mapboxAndroidCore: '1.1.0'
|
||||
]
|
||||
|
||||
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}",
|
||||
mapboxAndroidGestures : "com.mapbox.mapboxsdk:mapbox-android-gestures:${versions.mapboxGestures}",
|
||||
|
||||
// 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}",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'signing'
|
||||
apply from: "${rootDir}/gradle/dependencies.gradle"
|
||||
|
||||
allprojects {
|
||||
group project.GROUP
|
||||
@@ -98,21 +97,6 @@ afterEvaluate { project ->
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def vendorMap = getVendorMap()
|
||||
pom.whenConfigured { pom ->
|
||||
println("Current dependencies ${pom.dependencies}")
|
||||
pom.dependencies.each { dep ->
|
||||
println("Processing vendor ${dep}")
|
||||
if (dep.getGroupId() == rootProject.name) {
|
||||
Vendor vendor = vendorMap.get(dep.getArtifactId())
|
||||
dep.setGroupId(project.GROUP)
|
||||
dep.setArtifactId(vendor.artifactName)
|
||||
dep.setVersion(vendor.artifactVersion)
|
||||
println("Updated vendor ${dep}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,33 +141,3 @@ afterEvaluate { project ->
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// this class holds values that will be included in the resulting pom file for vendorized libraries
|
||||
class Vendor {
|
||||
private final artifactName
|
||||
private final artifactVersion
|
||||
|
||||
Vendor(artifactName, artifactVersion) {
|
||||
this.artifactName = artifactName
|
||||
this.artifactVersion = artifactVersion
|
||||
}
|
||||
|
||||
def getArtifactName() {
|
||||
return artifactName
|
||||
}
|
||||
|
||||
def getArtifactVersion() {
|
||||
return artifactVersion
|
||||
}
|
||||
}
|
||||
|
||||
HashMap<String, Vendor> getVendorMap() {
|
||||
def map = new HashMap<String, Vendor>()
|
||||
map.put("mapbox-android-gestures", new Vendor(vendorArtifacts.mapboxGestures, vendorVersions.mapboxGestures))
|
||||
map.put("services-core", new Vendor(vendorArtifacts.mapboxJavaCore, vendorVersions.mapboxJava))
|
||||
map.put("services-turf", new Vendor(vendorArtifacts.mapboxJavaTurf, vendorVersions.mapboxJava))
|
||||
map.put("services-geojson", new Vendor(vendorArtifacts.mapboxJavaGeojson, vendorVersions.mapboxJava))
|
||||
map.put("libcore", new Vendor(vendorArtifacts.mapboxAndroidCore, vendorVersions.mapboxAndroidCore))
|
||||
map.put("libtelemetry", new Vendor(vendorArtifacts.mapboxTelemetry, vendorVersions.mapboxTelemetry))
|
||||
return map
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
task updateVendorSubmodules {
|
||||
"git submodule update --init --recursive vendor".execute()
|
||||
}
|
||||
@@ -1,7 +1 @@
|
||||
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')
|
||||
project(':libtelemetry').projectDir = new File('vendor/mapbox-events-android/libtelemetry')
|
||||
project(':libcore').projectDir = new File('vendor/mapbox-events-android/libcore')
|
||||
include ':MapboxGLAndroidSDK', ':MapboxGLAndroidSDKTestApp', ':MapboxGLAndroidSDKLint'
|
||||
Submodule platform/android/vendor/mapbox-events-android updated: 20c31407f2...1636d1ae9d
Submodule platform/android/vendor/mapbox-gestures-android updated: 9d105dce2a...5d2bcdc6d2
2
platform/android/vendor/mapbox-java
vendored
2
platform/android/vendor/mapbox-java
vendored
Submodule platform/android/vendor/mapbox-java updated: 22a324ffc3...f21558ad03
Reference in New Issue
Block a user