Skip to content

Commit

Permalink
- fix typo
Browse files Browse the repository at this point in the history
- ignore case for keys of the map
  • Loading branch information
mikepenz committed Apr 9, 2024
1 parent 5f0c06f commit bd8af5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ abstract class AboutLibrariesTask : BaseAboutLibrariesTask() {
}

val missingMapped = mutableMapOf<License, List<Library>>()
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) {
Expand Down

0 comments on commit bd8af5a

Please sign in to comment.