Fix jnilib files not signed (#1799)

This commit is contained in:
Thomas Vos
2022-02-08 13:43:36 +01:00
committed by GitHub
parent e818953c0b
commit 03d98ae908

View File

@@ -31,9 +31,22 @@ internal class MacJarSignFileCopyingProcessor(
* so we need to remove signature before running jpackage.
*
* JDK 18 processes signed libraries fine, so we don't have to do anything.
*
* Note that the JDK only signs dylib files and not jnilib files,
* so jnilib files still need to be signed here.
*/
jvmRuntimeVersion == 17 -> signer.unsign(target)
else -> {}
jvmRuntimeVersion == 17 -> {
if (source.name.endsWith(".jnilib")) {
signer.sign(target)
} else {
signer.unsign(target)
}
}
else -> {
if (source.name.endsWith(".jnilib")) {
signer.sign(target)
}
}
}
}
}