Skip to content

Commit

Permalink
Fix license to be Mapbox Terms of Service. (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
pengdev authored Dec 16, 2022
1 parent d97bdcf commit 444a615
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 7 deletions.
12 changes: 12 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
<!-- This file was generated. Use `python scripts/license-generate.py`to update. -->
### License

Mapbox Base SDK for Android

Copyright &copy; 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
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}
4 changes: 2 additions & 2 deletions gradle/artifact-settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
16 changes: 14 additions & 2 deletions scripts/license-generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
try:
with open(path + "/LICENSE.md", 'w+') as licenseFile:
licenseFile.write("<!-- This file was generated. Use `python scripts/license-generate.py`to update. --> \n")
licenseFile.write("### License\n")
licenseFile.write("\n")
licenseFile.write("Mapbox Base SDK for Android\n")
licenseFile.write("\n")
licenseFile.write("Copyright &copy; 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)
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion scripts/license-validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
print("License file is up to date")

0 comments on commit 444a615

Please sign in to comment.