File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
tools/curations/buildSrc/src/main/kotlin Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -154,17 +154,20 @@ private fun LicenseDetails.getCategories(): Set<String> {
154
154
else -> category.replace(' ' , ' -' ).lowercase()
155
155
}
156
156
157
- return setOfNotNull(
158
- mappedCategory,
157
+ return addExtraCategories(mappedCategory) + mappedCategory
158
+ }
159
+
160
+ private fun addExtraCategories (category : String ): Set <String > =
161
+ setOfNotNull(
162
+ category,
159
163
// Include all licenses into the notice file to ensure there is no under-reporting by default.
160
164
" include-in-notice-file" .takeUnless {
161
- mappedCategory in setOf (CATEGORY_UNKNOWN , CATEGORY_GENERIC , CATEGORY_CLA )
165
+ category in setOf (CATEGORY_UNKNOWN , CATEGORY_GENERIC , CATEGORY_CLA )
162
166
},
163
167
// The FSF has stated that a source code offer is required for Copyleft (limited) licences, so
164
168
// include only these to not cause unnecessary effort by default.
165
- " include-source-code-offer-in-notice-file" .takeIf { mappedCategory in setOf (" copyleft" , " copyleft-limited" ) }
169
+ " include-source-code-offer-in-notice-file" .takeIf { category in setOf (" copyleft" , " copyleft-limited" ) }
166
170
)
167
- }
168
171
169
172
private fun getLicenseClassifications (licenseDetails : Collection <LicenseDetails >): LicenseClassifications {
170
173
val categories = licenseDetails.flatMap { details ->
You can’t perform that action at this time.
0 commit comments