From a66cc608a964e2e309c23149735b9145255182c1 Mon Sep 17 00:00:00 2001 From: kevin Date: Thu, 18 Apr 2019 15:32:46 +0800 Subject: update android-nitpick.gradle --- platform/android/LICENSE.md | 6 ++++++ platform/android/gradle/android-nitpick.gradle | 10 ++++++---- platform/android/gradle/dependencies.gradle | 1 + platform/android/scripts/validate-license.py | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/platform/android/LICENSE.md b/platform/android/LICENSE.md index 452f6d65a8..35ae99120f 100644 --- a/platform/android/LICENSE.md +++ b/platform/android/LICENSE.md @@ -71,6 +71,12 @@ 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) diff --git a/platform/android/gradle/android-nitpick.gradle b/platform/android/gradle/android-nitpick.gradle index 32539270f5..6db3519678 100644 --- a/platform/android/gradle/android-nitpick.gradle +++ b/platform/android/gradle/android-nitpick.gradle @@ -5,6 +5,7 @@ def MAPBOX_JAVA_TAG_PREFIX = 'v' def MAPBOX_TELEMETRY_DIR = 'mapbox-events-android' def MAPBOX_TELEMETRY_TAG_PREFIX = 'telem-' +def MAPBOX_CORE_TAG_PREFIX = '-core-' def MAPBOX_GESTURES_DIR = 'mapbox-gestures-android' def MAPBOX_GESTURES_TAG_PREFIX = 'v' @@ -15,9 +16,10 @@ task androidNitpick { println "Verify vendor submodule pins" verifyVendorSubmodulePin(MAPBOX_JAVA_DIR, MAPBOX_JAVA_TAG_PREFIX, versions.mapboxServices) - verifyVendorSubmodulePin(MAPBOX_TELEMETRY_DIR, MAPBOX_TELEMETRY_TAG_PREFIX, versions.mapboxTelemetry) + verifyVendorSubmodulePin(MAPBOX_TELEMETRY_DIR, MAPBOX_TELEMETRY_TAG_PREFIX, + versions.mapboxTelemetry + MAPBOX_CORE_TAG_PREFIX + versions.mapboxCore) verifyVendorSubmodulePin(MAPBOX_GESTURES_DIR, MAPBOX_GESTURES_TAG_PREFIX, versions.mapboxGestures) - + verifyLicenseGeneration() } } @@ -58,7 +60,7 @@ private def verifyVendorSubmodulePin(def dir, def prefix, def version) { private def verifyLicenseGeneration() { println "Verify license generation with git diff..." exec { - workingDir = "${rootDir}" - commandLine "python", "scripts/validate-license.py" + workingDir = "${rootDir}" + commandLine "python", "scripts/validate-license.py" } } \ No newline at end of file diff --git a/platform/android/gradle/dependencies.gradle b/platform/android/gradle/dependencies.gradle index 4b69fdef26..0cd3a2e7fe 100644 --- a/platform/android/gradle/dependencies.gradle +++ b/platform/android/gradle/dependencies.gradle @@ -9,6 +9,7 @@ ext { versions = [ mapboxServices : '4.6.0', mapboxTelemetry : '4.4.1', + mapboxCore : '1.3.0', mapboxGestures : '0.4.1', supportLib : '27.1.1', constraintLayout: '1.1.2', diff --git a/platform/android/scripts/validate-license.py b/platform/android/scripts/validate-license.py index 365d7ac265..1c9a153b82 100644 --- a/platform/android/scripts/validate-license.py +++ b/platform/android/scripts/validate-license.py @@ -10,7 +10,7 @@ call('cd ../../ && make android-license', shell=True) ## Git diff changes p = Popen(['git', 'diff', '--name-only', 'LICENSE.md'], stdin=PIPE, stdout=PIPE, stderr=PIPE) output, err = p.communicate(b"input data that is passed to subprocess' stdin") -if "platform/android/LICENSE.md" in output: +if b"platform/android/LICENSE.md" in output: raise ValueError("""An error ocurred while validating the license generation. Changes were detected to the license generation output but weren't commited. Run make android-license and -- cgit v1.2.1