GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improves license name matching. · felex13/AboutLibraries@881526a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • app
    • build.gradle.kts
  • plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping
    • SpdxLicense.kt
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎app/build.gradle.kts‎

Copy file name to clipboardExpand all lines: app/build.gradle.kts
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ dependencies {
144144

145145
// used only tho showcase multi flavor support
146146
"stagingImplementation"(libs.okhttp.core)
147+
148+
// used to test matching of license names
149+
implementation("com.github.librepdf:openpdf:1.3.43")
150+
implementation("com.google.android.play:app-update-ktx:2.1.0")
147151
}
148152

149153
configurations.configureEach {
Collapse file

‎plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/SpdxLicense.kt‎

Copy file name to clipboardExpand all lines: plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/SpdxLicense.kt
+29-4Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ enum class SpdxLicense(
208208
Leptonica("Leptonica License", "Leptonica"),
209209
LGPL_2_0_only("GNU Library General Public License v2 only", "LGPL-2.0-only"),
210210
LGPL_2_0_or_later("GNU Library General Public License v2 or later", "LGPL-2.0-or-later"),
211-
LGPL_2_1_only("GNU Lesser General Public License v2.1 only", "LGPL-2.1-only"),
212211
LGPL_2_1_or_later("GNU Lesser General Public License v2.1 or later", "LGPL-2.1-or-later"),
213212
LGPL_3_0_only("GNU Lesser General Public License v3.0 only", "LGPL-3.0-only"),
214213
LGPL_3_0_or_later("GNU Lesser General Public License v3.0 or later", "LGPL-3.0-or-later"),
@@ -239,7 +238,6 @@ enum class SpdxLicense(
239238
mpich2("mpich2 License", "mpich2"),
240239
MPL_1_0("Mozilla Public License 1.0", "MPL-1.0"),
241240
MPL_1_1("Mozilla Public License 1.1", "MPL-1.1"),
242-
MPL_2_0("Mozilla Public License 2.0", "MPL-2.0"),
243241
MPL_2_0_no_copyleft_exception(
244242
"Mozilla Public License 2.0 (no copyleft exception)",
245243
"MPL-2.0-no-copyleft-exception"
@@ -407,9 +405,17 @@ enum class SpdxLicense(
407405
|| name.equals("BSD 3-clause", true)
408406
|| url?.endsWith("opensource.org/licenses/BSD-3-Clause", true) == true
409407
}),
408+
LGPL_2_1_only("GNU Lesser General Public License v2.1 only", "LGPL-2.1-only", customMatcher = { name, _ ->
409+
name.contains("GNU Lesser General Public License", true)
410+
&& name.contains("2.1", true)
411+
}),
410412
MIT("MIT License", "MIT", customMatcher = { name, _ ->
411413
name.contains("MIT", true)
412414
}),
415+
MPL_2_0("Mozilla Public License 2.0", "MPL-2.0", customMatcher = { name, _ ->
416+
name.contains("Mozilla Public License", true)
417+
&& name.contains("2.0", true)
418+
}),
413419
CC0_1_0("Creative Commons Zero v1.0 Universal", "CC0-1.0", customMatcher = { name, _ ->
414420
name.equals("CC0", true)
415421
}),
@@ -421,8 +427,19 @@ enum class SpdxLicense(
421427
}),
422428

423429
// Special proprietary libraries section
424-
ASDKL("Android Software Development Kit License", "ASDKL"),
425-
CTS("Crashlytics Terms of Service", "CTS"),
430+
ASDKL(
431+
"Android Software Development Kit License",
432+
"ASDKL",
433+
customUrl = "https://developer.android.com/studio/terms.html",
434+
customMatcher = { name, _ ->
435+
name.contains("Android Software Development Kit License", false)
436+
}
437+
),
438+
CTS(
439+
"Crashlytics Terms of Service",
440+
"CTS",
441+
customUrl = "https://firebase.google.com/terms/crashlytics.html",
442+
),
426443
FSSA("Fabric Software and Services Agreement", "FSSA"),
427444
GPL_2_0_CPE(
428445
"GNU General Public License, version 2, with the Classpath Exception",
@@ -431,6 +448,14 @@ enum class SpdxLicense(
431448
customMatcher = { name, url ->
432449
url?.equals("https://www.gnu.org/software/classpath/license.html") == true
433450
}
451+
),
452+
PCSDKToS(
453+
"Play Core Software Development Kit Terms of Service",
454+
"PCSDKToS",
455+
customUrl = "https://developer.android.com/guide/playcore.html#license",
456+
customMatcher = { name, _ ->
457+
name.contains("Play Core Software Development Kit", true)
458+
}
434459
);
435460

436461
fun getUrl(): String = customUrl ?: "https://spdx.org/licenses/$id.html"

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.