diff --git a/buildpacks/jvm/CHANGELOG.md b/buildpacks/jvm/CHANGELOG.md index bcd5c527..d6669f9a 100644 --- a/buildpacks/jvm/CHANGELOG.md +++ b/buildpacks/jvm/CHANGELOG.md @@ -3,6 +3,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +* Support for Java 16 ## [0.1.4] 2021/02/23 diff --git a/buildpacks/jvm/lib/jvm.sh b/buildpacks/jvm/lib/jvm.sh index 3946cd87..e888ac10 100644 --- a/buildpacks/jvm/lib/jvm.sh +++ b/buildpacks/jvm/lib/jvm.sh @@ -17,6 +17,7 @@ DEFAULT_JDK_12_VERSION="12.0.2" DEFAULT_JDK_13_VERSION="13.0.6" DEFAULT_JDK_14_VERSION="14.0.2" DEFAULT_JDK_15_VERSION="15.0.2" +DEFAULT_JDK_16_VERSION="16.0.0" if [[ -n "${JDK_BASE_URL}" ]]; then # Support for setting JDK_BASE_URL had the issue that it has to contain the stack name. This makes it hard to @@ -67,6 +68,8 @@ get_full_jdk_version() { echo "$DEFAULT_JDK_14_VERSION" elif [ "${jdkVersion}" = "15" ]; then echo "$DEFAULT_JDK_15_VERSION" + elif [ "${jdkVersion}" = "16" ]; then + echo "$DEFAULT_JDK_16_VERSION" elif [ "$(expr "${jdkVersion}" : '^1.[6-9]$')" != 0 ]; then local minorJdkVersion minorJdkVersion=$(expr "${jdkVersion}" : '1.\([6-9]\)') @@ -87,7 +90,7 @@ get_jdk_url() { jdkVersion="$(get_full_jdk_version "${shortJdkVersion}")" local jdkUrl - if [ "$(expr "${jdkVersion}" : '^1[0-5]')" != 0 ]; then + if [ "$(expr "${jdkVersion}" : '^1[0-9]')" != 0 ]; then jdkUrl="${JDK_BASE_URL}/openjdk${jdkVersion}.tar.gz" elif [ "$(expr "${jdkVersion}" : '^1.[6-9]')" != 0 ]; then jdkUrl="${JDK_BASE_URL}/openjdk${jdkVersion}.tar.gz"