aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamruddhi Khandale <skhandale@microsoft.com>2022-08-10 01:37:23 +0300
committerGitHub <noreply@github.com>2022-08-10 01:37:23 +0300
commit3a554b81abdf39c3ae605451bb3ec0d6dfd41703 (patch)
treea8e8b76f2e36986754e2dec9a690d7e4b31b09e1
parentabfefdcb31d1a76a9d7718ccf5f4da6b578cdb45 (diff)
Java: fix gradle bug - invalid version (#84)
* Java: fix gradle bug - invalid version * drop 'lts'
-rw-r--r--src/java/devcontainer-feature.json5
-rwxr-xr-xsrc/java/install.sh2
-rw-r--r--test-scenarios/install_gradle_and_maven.sh1
-rw-r--r--test-scenarios/scenarios.json2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/java/devcontainer-feature.json b/src/java/devcontainer-feature.json
index 330ef5b..0a03a85 100644
--- a/src/java/devcontainer-feature.json
+++ b/src/java/devcontainer-feature.json
@@ -1,20 +1,19 @@
{
"id": "java",
- "version": "1.0.0",
+ "version": "1.0.1",
"name": "Java (via SDKMAN!)",
"description": "Installs Java, SDKMAN! (if not installed), and needed dependencies.",
"options": {
"version": {
"type": "string",
"proposals": [
- "lts",
"latest",
"none",
"17",
"11",
"8"
],
- "default": "lts",
+ "default": "latest",
"description": "Select or enter a Java version to install"
},
"install_gradle": {
diff --git a/src/java/install.sh b/src/java/install.sh
index 411fffb..002adf6 100755
--- a/src/java/install.sh
+++ b/src/java/install.sh
@@ -100,7 +100,7 @@ sdk_install() {
local set_as_default=${6:-"true"}
if [ "${requested_version}" = "none" ]; then return; fi
# Blank will install latest stable version SDKMAN has
- if [ "${requested_version}" = "lts" ] || [ "${requested_version}" = "default" ]; then
+ if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "lts" ] || [ "${requested_version}" = "default" ]; then
requested_version=""
elif echo "${requested_version}" | grep -oE "${full_version_check}" > /dev/null 2>&1; then
echo "${requested_version}"
diff --git a/test-scenarios/install_gradle_and_maven.sh b/test-scenarios/install_gradle_and_maven.sh
index 4324667..a81dd9e 100644
--- a/test-scenarios/install_gradle_and_maven.sh
+++ b/test-scenarios/install_gradle_and_maven.sh
@@ -5,6 +5,7 @@ set -e
# Optional: Import test library
source dev-container-features-test-lib
+check "java" java --version
check "gradle" gradle --version
check "maven" mvn --version
diff --git a/test-scenarios/scenarios.json b/test-scenarios/scenarios.json
index 4ff49ed..d40aa48 100644
--- a/test-scenarios/scenarios.json
+++ b/test-scenarios/scenarios.json
@@ -3,7 +3,7 @@
"image": "ubuntu:focal",
"features": {
"java": {
- "version": "17",
+ "version": "latest",
"install_gradle": true,
"install_maven": true
}