Package the JDK into jdk.app on macOS (#48765)

This commit packages the bundled JDK into jdk.app on macOS to assist
with notarization there.
This commit is contained in:
Jason Tedor 2019-10-31 15:11:44 -04:00
parent 6da97350c8
commit b1c5025498
No known key found for this signature in database
GPG Key ID: FA89F05560F16BC5
2 changed files with 10 additions and 4 deletions

View File

@ -61,10 +61,16 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String pla
with binFiles(distributionType, oss, jdk)
}
if (jdk) {
if ("darwin".equals(platform)) {
into('jdk.app') {
with jdkFiles(project, platform)
}
} else {
into('jdk') {
with jdkFiles(project, platform)
}
}
}
into('') {
from {
dirMode 0755

View File

@ -41,8 +41,8 @@ if [ ! -z "$JAVA_HOME" ]; then
JAVA_TYPE="JAVA_HOME"
else
if [ "$(uname -s)" = "Darwin" ]; then
# OSX has a different structure
JAVA="$ES_HOME/jdk/Contents/Home/bin/java"
# macOS has a different structure
JAVA="$ES_HOME/jdk.app/Contents/Home/bin/java"
else
JAVA="$ES_HOME/jdk/bin/java"
fi