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 — - improved mapping of EPL 2.0 license · felex13/AboutLibraries@4b684f6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping
    • SpdxLicense.kt
Expand file treeCollapse file tree
Open diff view settings
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
+11-7Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ enum class SpdxLicense(
151151
EPL_1_0("Eclipse Public License 1.0", "EPL-1.0"),
152152
EPL_2_0("Eclipse Public License 2.0", "EPL-2.0", "epl_2_0", customMatcher = { _, url ->
153153
url == "https://www.eclipse.org/legal/epl-v20.html"
154+
|| url == "https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt"
154155
}),
155156
ErlPL_1_1("Erlang Public License v1.1", "ErlPL-1.1"),
156157
etalab_2_0("Etalab Open License 2.0", "etalab-2.0"),
@@ -392,19 +393,19 @@ enum class SpdxLicense(
392393

393394
// Special handling section
394395
Apache_2_0("Apache License 2.0", "Apache-2.0", customMatcher = { name, url ->
395-
name.contains("Apache", true) || url?.endsWith("LICENSE-2.0.txt") == true
396+
name.contains("Apache", true)
397+
|| url?.endsWith("LICENSE-2.0.txt") == true
396398
}),
397399
BSD_2_Clause("BSD 2-Clause \"Simplified\" License", "BSD-2-Clause", customMatcher = { name, url ->
398400
name.equals("BSD 2-Clause License", true)
399401
|| url?.endsWith("opensource.org/licenses/BSD-2-Clause", true) == true
400402
|| url?.endsWith("opensource.org/licenses/bsd-license", true) == true
401403
}),
402404
BSD_3_Clause("BSD 3-Clause \"New\" or \"Revised\" License", "BSD-3-Clause", customMatcher = { name, url ->
403-
name.equals("New BSD License", true) || name.equals("Modified BSD License", true) || name.equals(
404-
"BSD 3-clause",
405-
true
406-
) ||
407-
url?.endsWith("opensource.org/licenses/BSD-3-Clause", true) == true
405+
name.equals("New BSD License", true)
406+
|| name.equals("Modified BSD License", true)
407+
|| name.equals("BSD 3-clause", true)
408+
|| url?.endsWith("opensource.org/licenses/BSD-3-Clause", true) == true
408409
}),
409410
MIT("MIT License", "MIT", customMatcher = { name, _ ->
410411
name.contains("MIT", true)
@@ -426,7 +427,10 @@ enum class SpdxLicense(
426427
GPL_2_0_CPE(
427428
"GNU General Public License, version 2, with the Classpath Exception",
428429
"GPL-2.0-CPE",
429-
customUrl = "https://openjdk.org/legal/gplv2+ce.html"
430+
customUrl = "https://openjdk.org/legal/gplv2+ce.html",
431+
customMatcher = { name, url ->
432+
url?.equals("https://www.gnu.org/software/classpath/license.html") == true
433+
}
430434
);
431435

432436
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.