From 0d013cf34df4583a4ef52341dd7569e5a512cc82 Mon Sep 17 00:00:00 2001 From: Peng Liu Date: Wed, 14 Dec 2022 11:40:39 +0200 Subject: [PATCH] Fix license to be Mapbox Terms of Service. --- LICENSE.md | 12 ++++++++++++ buildSrc/src/main/kotlin/Project.kt | 4 ++-- gradle/artifact-settings.gradle | 4 ++-- scripts/license-generate.py | 16 ++++++++++++++-- scripts/license-validate.py | 2 +- 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index c4289df..a462175 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,2 +1,14 @@ +### License + +Mapbox Base SDK for Android + +Copyright © 2021 Mapbox + +All rights reserved. + +Mapbox Base SDK for Android must be used according to the Mapbox Terms of Service. This license allows developers with a current active Mapbox account to use and modify the Mapbox Maps Android SDK. Developers may modify the Mapbox Maps Android SDK code so long as the modifications do not change or interfere with marked portions of the code related to billing, accounting, and anonymized data collection. The Mapbox Maps Android SDK sends anonymized location and usage data, which Mapbox uses for fixing bugs and errors, accounting, and generating aggregated anonymized statistics. This license terminates automatically if a user no longer has an active Mapbox account. + +For the full license terms, please see the Mapbox Terms of Service at https://www.mapbox.com/legal/tos/ + ## Additional Mapbox Base Android licenses diff --git a/buildSrc/src/main/kotlin/Project.kt b/buildSrc/src/main/kotlin/Project.kt index 3ebc52d..88d402e 100644 --- a/buildSrc/src/main/kotlin/Project.kt +++ b/buildSrc/src/main/kotlin/Project.kt @@ -46,6 +46,6 @@ object ArtifactSettings { const val artifactUrl = "https://github.com/mapbox/mapbox-base-android" const val artifactVcsUrl = "https://github.com/mapbox/mapbox-base-android.git" const val artifactScmUrl = "scm:git@github.com:mapbox/mapbox-base-android.git" - const val artifactLicenseName = "BSD" - const val artifactLicenseUrl = "https://opensource.org/licenses/BSD-2-Clause" + const val artifactLicenseName = "Mapbox Terms of Service" + const val artifactLicenseUrl = "https://www.mapbox.com/legal/tos/" } diff --git a/gradle/artifact-settings.gradle b/gradle/artifact-settings.gradle index 2520088..c56978b 100644 --- a/gradle/artifact-settings.gradle +++ b/gradle/artifact-settings.gradle @@ -9,8 +9,8 @@ ext { mapboxArtifactUrl = 'https://github.com/mapbox/mapbox-base-android' mapboxArtifactVcsUrl = 'https://github.com/mapbox/mapbox-base-android.git' mapboxArtifactScmUrl = 'scm:git@github.com:mapbox/mapbox-base-android.git' - mapboxArtifactLicenseName = 'BSD' - mapboxArtifactLicenseUrl = 'https://opensource.org/licenses/BSD-2-Clause' + mapboxArtifactLicenseName = 'Mapbox Terms of Service' + mapboxArtifactLicenseUrl = 'https://www.mapbox.com/legal/tos/' versionName = project.property('VERSION_NAME') diff --git a/scripts/license-generate.py b/scripts/license-generate.py index 6ae6b54..ae83bf7 100644 --- a/scripts/license-generate.py +++ b/scripts/license-generate.py @@ -10,6 +10,18 @@ try: with open(path + "/LICENSE.md", 'w+') as licenseFile: licenseFile.write(" \n") + licenseFile.write("### License\n") + licenseFile.write("\n") + licenseFile.write("Mapbox Base SDK for Android\n") + licenseFile.write("\n") + licenseFile.write("Copyright © 2021 Mapbox\n") + licenseFile.write("\n") + licenseFile.write("All rights reserved.\n") + licenseFile.write("\n") + licenseFile.write("Mapbox Base SDK for Android must be used according to the Mapbox Terms of Service. This license allows developers with a current active Mapbox account to use and modify the Mapbox Maps Android SDK. Developers may modify the Mapbox Maps Android SDK code so long as the modifications do not change or interfere with marked portions of the code related to billing, accounting, and anonymized data collection. The Mapbox Maps Android SDK sends anonymized location and usage data, which Mapbox uses for fixing bugs and errors, accounting, and generating aggregated anonymized statistics. This license terminates automatically if a user no longer has an active Mapbox account.\n") + licenseFile.write("\n") + licenseFile.write("For the full license terms, please see the Mapbox Terms of Service at https://www.mapbox.com/legal/tos/\n") + licenseFile.write("\n") licenseFile.write("## Additional Mapbox Base Android licenses\n") with open(path + "/common/build/reports/licenses/licenseReport.json", 'r') as dataFile: data = json.load(dataFile) @@ -40,8 +52,8 @@ "License: [%s](%s)" % (licenseName, licenseUrl) + "\n\n===========================================================================\n\n") licenseFile.close() -except IOError as (errno,strerror): - print "I/O error({0}): {1}".format(errno, strerror) +except IOError as err: + print("I/O error({0}): {1}".format(err.errno, err.strerror)) # remove obsolete open_source_licenses.html # os.system("rm -f common/src/main/assets/open_source_licenses.html") diff --git a/scripts/license-validate.py b/scripts/license-validate.py index c6ba7a3..417403a 100644 --- a/scripts/license-validate.py +++ b/scripts/license-validate.py @@ -15,4 +15,4 @@ but weren't commited. Run python scripts/license-generate.py and commit the changeset to make this validation pass.""") else: - print "License file is up to date" \ No newline at end of file + print("License file is up to date") \ No newline at end of file