summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorŁukasz Paczos <lukasz.paczos@mapbox.com>2018-06-13 18:24:38 +0200
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2018-06-14 11:55:13 +0200
commit20969089336b69c915f541f7c45d06b9465f26cd (patch)
tree085efbac2624ddf785e7ad13e303bd4533d6cf3f /platform
parent3584ee40f431200ae2ef33dfcff26483aeacf1a1 (diff)
downloadqtlocation-mapboxgl-20969089336b69c915f541f7c45d06b9465f26cd.tar.gz
[android] - added Android licenses make target
Diffstat (limited to 'platform')
-rw-r--r--platform/android/LICENSE.md119
-rw-r--r--platform/android/MapboxGLAndroidSDK/build.gradle8
-rw-r--r--platform/android/build.gradle1
-rw-r--r--platform/android/scripts/generate-license.py39
4 files changed, 167 insertions, 0 deletions
diff --git a/platform/android/LICENSE.md b/platform/android/LICENSE.md
new file mode 100644
index 0000000000..e3743bc5fb
--- /dev/null
+++ b/platform/android/LICENSE.md
@@ -0,0 +1,119 @@
+<!-- This file was generated. Use `make android-license` to update. -->
+## Additional Mapbox GL licenses
+Mapbox GL uses portions of the Android Arch-Common.
+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 Arch-Runtime.
+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)
+
+===========================================================================
+
+Mapbox GL uses portions of the Android Lifecycle Runtime.
+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 ViewModel.
+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-Common.
+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 Support Library Annotations.
+URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html)
+License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+===========================================================================
+
+Mapbox GL uses portions of the Android Support Library compat.
+URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html)
+License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+===========================================================================
+
+Mapbox GL uses portions of the Android Support Library core UI.
+URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html)
+License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+===========================================================================
+
+Mapbox GL uses portions of the Android Support Library core utils.
+URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html)
+License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+===========================================================================
+
+Mapbox GL uses portions of the Android Support Library fragment.
+URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html)
+License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+===========================================================================
+
+Mapbox GL uses portions of the Gson.
+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 OkHttp.
+License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+===========================================================================
+
+Mapbox GL uses portions of the Okio.
+License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+===========================================================================
+
+Mapbox GL uses portions of the Timber.
+URL: [https://github.com/JakeWharton/timber](https://github.com/JakeWharton/timber)
+License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+===========================================================================
+
+Mapbox GL uses portions of the Gradle License Plugin.
+URL: [https://github.com/jaredsburrows/gradle-license-plugin](https://github.com/jaredsburrows/gradle-license-plugin)
+License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+===========================================================================
+
diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle
index 86919d21bc..64f2e5f73d 100644
--- a/platform/android/MapboxGLAndroidSDK/build.gradle
+++ b/platform/android/MapboxGLAndroidSDK/build.gradle
@@ -1,4 +1,5 @@
apply plugin: 'com.android.library'
+apply plugin: "com.jaredsburrows.license"
dependencies {
api (dependenciesList.mapboxAndroidTelemetry) {
@@ -133,6 +134,13 @@ android {
}
}
+licenseReport {
+ generateHtmlReport = false
+ generateJsonReport = true
+ copyHtmlReportToAssets = false
+ copyJsonReportToAssets = false
+}
+
def static getGitRevision() {
def cmd = "git rev-parse --short HEAD"
def proc = cmd.execute()
diff --git a/platform/android/build.gradle b/platform/android/build.gradle
index 45cddd9688..358c896bd0 100644
--- a/platform/android/build.gradle
+++ b/platform/android/build.gradle
@@ -6,6 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
+ classpath "com.jaredsburrows:gradle-license-plugin:0.8.41"
}
}
diff --git a/platform/android/scripts/generate-license.py b/platform/android/scripts/generate-license.py
new file mode 100644
index 0000000000..a05169e096
--- /dev/null
+++ b/platform/android/scripts/generate-license.py
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+
+import os
+import json
+
+path = os.getcwd() + "/platform/android/"
+with open(path + "LICENSE.md", 'w') as licenseFile:
+ licenseFile.write("<!-- This file was generated. Use `make android-license` to update. -->\n")
+ licenseFile.write("## Additional Mapbox GL licenses\n")
+ with open(path + "MapboxGLAndroidSDK/build/reports/licenses/licenseReleaseReport.json", 'r') as dataFile:
+ data = json.load(dataFile)
+
+ gradleLicensePlugin ="""
+ {
+ "project": "Gradle License Plugin",
+ "url": "https://github.com/jaredsburrows/gradle-license-plugin",
+ "licenses": [
+ {
+ "license": "The Apache Software License, Version 2.0",
+ "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
+ }
+ ]
+ }
+ """
+ data.append(json.loads(gradleLicensePlugin))
+
+ licenseName = ""
+ licenseUrl = ""
+ for entry in data:
+ projectName = entry["project"]
+ projectUrl = entry["url"]
+ for license in entry["licenses"]:
+ licenseName = license["license"]
+ licenseUrl = license["license_url"]
+
+ licenseFile.write("Mapbox GL uses portions of the %s.\n" % projectName +
+ ("URL: [%s](%s)\n" % (projectUrl, projectUrl) if projectUrl is not None else "") +
+ "License: [%s](%s)" % (licenseName, licenseUrl) +
+ "\n\n===========================================================================\n\n")