summaryrefslogtreecommitdiff
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
parent3584ee40f431200ae2ef33dfcff26483aeacf1a1 (diff)
downloadqtlocation-mapboxgl-20969089336b69c915f541f7c45d06b9465f26cd.tar.gz
[android] - added Android licenses make target
-rw-r--r--LICENSE.md86
-rw-r--r--Makefile6
-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
6 files changed, 177 insertions, 82 deletions
diff --git a/LICENSE.md b/LICENSE.md
index 0b77be538e..ccdedde311 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -25,52 +25,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
===========================================================================
-Mapbox GL uses portions of Android Gesture Detectors Framework.
-
-Copyright (c) 2012, Almer Thie
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===========================================================================
-
-Mapbox GL uses portions of Android Support Library.
-
-Copyright (c) 2005-2013, The Android Open Source Project
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-===========================================================================
-
Mapbox GL uses portions of Boost.
Distributed under the Boost Software License, Version 1.0.
@@ -510,24 +464,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
===========================================================================
-Mapbox GL uses portions of LOST.
-
-Copyright (c) 2014 Mapzen
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-===========================================================================
-
Mapbox GL uses portions of the Mapbox iOS SDK, which was derived from the
Route-Me open source project, including the Alpstein fork of it.
@@ -583,24 +519,6 @@ THE SOFTWARE.
===========================================================================
-Mapbox GL uses portions of OkHTTP.
-
-Copyright 2014 Square, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-===========================================================================
-
Mapbox GL uses portions of OpenSSL.
LICENSE ISSUES
@@ -942,3 +860,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+
+===========================================================================
+
+Mapbox GL uses portions of software mentioned in [platform/android/LICENSE.md](https://github.com/mapbox/mapbox-gl-native/blob/master/platform/android/LICENSE.md).
diff --git a/Makefile b/Makefile
index c616b3a567..4f6864cf4c 100644
--- a/Makefile
+++ b/Makefile
@@ -693,6 +693,12 @@ android-lint-test-app: platform/android/gradle/configuration.gradle
android-javadoc: platform/android/gradle/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDK:javadocrelease
+# Generates platform/android/LICENSE.md file based on all Android project dependencies
+.PHONY: android-license
+android-license: platform/android/gradle/configuration.gradle
+ cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDK:licenseReleaseReport
+ python platform/android/scripts/generate-license.py
+
# Symbolicate ndk stack traces for the arm-v7 abi
.PHONY: android-ndk-stack
android-ndk-stack: android-ndk-stack-arm-v7
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")