@@ -208,7 +208,6 @@ enum class SpdxLicense( |
208 | 208 | Leptonica("Leptonica License", "Leptonica"), |
209 | 209 | LGPL_2_0_only("GNU Library General Public License v2 only", "LGPL-2.0-only"), |
210 | 210 | 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"), |
212 | 211 | LGPL_2_1_or_later("GNU Lesser General Public License v2.1 or later", "LGPL-2.1-or-later"), |
213 | 212 | LGPL_3_0_only("GNU Lesser General Public License v3.0 only", "LGPL-3.0-only"), |
214 | 213 | 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( |
239 | 238 | mpich2("mpich2 License", "mpich2"), |
240 | 239 | MPL_1_0("Mozilla Public License 1.0", "MPL-1.0"), |
241 | 240 | MPL_1_1("Mozilla Public License 1.1", "MPL-1.1"), |
242 | | - MPL_2_0("Mozilla Public License 2.0", "MPL-2.0"), |
243 | 241 | MPL_2_0_no_copyleft_exception( |
244 | 242 | "Mozilla Public License 2.0 (no copyleft exception)", |
245 | 243 | "MPL-2.0-no-copyleft-exception" |
@@ -407,9 +405,17 @@ enum class SpdxLicense( |
407 | 405 | || name.equals("BSD 3-clause", true) |
408 | 406 | || url?.endsWith("opensource.org/licenses/BSD-3-Clause", true) == true |
409 | 407 | }), |
| 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 | + }), |
410 | 412 | MIT("MIT License", "MIT", customMatcher = { name, _ -> |
411 | 413 | name.contains("MIT", true) |
412 | 414 | }), |
| 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 | + }), |
413 | 419 | CC0_1_0("Creative Commons Zero v1.0 Universal", "CC0-1.0", customMatcher = { name, _ -> |
414 | 420 | name.equals("CC0", true) |
415 | 421 | }), |
@@ -421,8 +427,19 @@ enum class SpdxLicense( |
421 | 427 | }), |
422 | 428 |
|
423 | 429 | // 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 | + ), |
426 | 443 | FSSA("Fabric Software and Services Agreement", "FSSA"), |
427 | 444 | GPL_2_0_CPE( |
428 | 445 | "GNU General Public License, version 2, with the Classpath Exception", |
@@ -431,6 +448,14 @@ enum class SpdxLicense( |
431 | 448 | customMatcher = { name, url -> |
432 | 449 | url?.equals("https://www.gnu.org/software/classpath/license.html") == true |
433 | 450 | } |
| 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 | + } |
434 | 459 | ); |
435 | 460 |
|
436 | 461 | fun getUrl(): String = customUrl ?: "https://spdx.org/licenses/$id.html" |
|