Skip to content

Commit 4ee95e9

Browse files
committed
Fix crash after enabling MANIFEST parsing
1 parent ddafd98 commit 4ee95e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/license-gather-plugin/src/main/kotlin/com/github/vlsi/gradle/license/GatherLicenseTask.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,10 @@ open class GatherLicenseTask @Inject constructor(
500500
)
501501
JarFile(file).use { jar ->
502502
val bundleLicense = jar.manifest.mainAttributes.getValue("Bundle-License")
503+
if (bundleLicense.startsWith("http://") || bundleLicense.startsWith("https://")) {
504+
// Ignore URLs here as it will fail during parsing
505+
return
506+
}
503507
val license = bundleLicense?.substringBefore(";")?.let {
504508
licenseExpressionParser.parse(it)
505509
}

0 commit comments

Comments
 (0)