Exclude JDK Contents/MacOS directory on Darwin (#55197)

This directory interferes with notarization and removing it before we
notarize allows us to have a properly notarized
distribution. Conceptually, this directory is only needed when building
a distribution to be installed by Installer (a so-called "pkg"). Since
we are not building such distributions, and this directory interferes
with notarization, we choose to exclude it here. We do this here, rather
than in our notarization process, to ensure that what we run through CI
for testing is also what we ship to the world.
This commit is contained in:
Jason Tedor 2020-04-15 09:28:17 -04:00
parent b5fe565c89
commit acf2acba4a
No known key found for this signature in database
GPG Key ID: FA89F05560F16BC5
1 changed files with 7 additions and 0 deletions

View File

@ -409,6 +409,13 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
return copySpec {
from project.jdks."bundled_${platform}_${architecture}"
exclude "demo/**"
/*
* The Contents/MacOS directory interferes with notarization, and is unused by our distribution, so we exclude
* it from the build.
*/
if ("darwin".equals(platform)) {
exclude "Contents/MacOS"
}
eachFile { FileCopyDetails details ->
if (details.relativePath.segments[-2] == 'bin' || details.relativePath.segments[-1] == 'jspawnhelper') {
details.mode = 0755