From bd8af5a305615cc8d691db3fb43246483a0b1a19 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Tue, 9 Apr 2024 16:48:47 +0200 Subject: [PATCH] - fix typo - ignore case for keys of the map --- .../mikepenz/aboutlibraries/plugin/AboutLibrariesExtension.kt | 2 +- .../com/mikepenz/aboutlibraries/plugin/AboutLibrariesTask.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesExtension.kt b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesExtension.kt index 4c065dbe7..8eeb827be 100644 --- a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesExtension.kt +++ b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesExtension.kt @@ -126,7 +126,7 @@ abstract class AboutLibrariesExtension { /** * Defines the allowed licenses for specific libraries which will not result in warnings or failures depending on the [strictMode] configuration. - * This is useful if some dependencies have special licenses which are only used in testing and are accepted for thsi case. + * This is useful if some dependencies have special licenses which are only used in testing and are accepted for this case. * * ``` * aboutLibraries { diff --git a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesTask.kt b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesTask.kt index 628fe1e99..541623803 100644 --- a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesTask.kt +++ b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesTask.kt @@ -57,9 +57,11 @@ abstract class AboutLibrariesTask : BaseAboutLibrariesTask() { } val missingMapped = mutableMapOf>() + val allowedLicensesMap = allowedLicensesMap.mapKeys { (key, _) -> key.lowercase(Locale.ENGLISH) } if (allowedLicensesMap.isNotEmpty()) { missing.forEach { val id = it.spdxId?.lowercase(Locale.ENGLISH) ?: it.hash.lowercase(Locale.ENGLISH) + val name = it.name.lowercase(Locale.ENGLISH) val libsForLicense = allowedLicensesMap[id] ?: allowedLicensesMap[name] if (libsForLicense != null) {