aboutsummaryrefslogtreecommitdiff
path: root/src/java/install.sh
diff options
context:
space:
mode:
authorTobias Gesellchen <tobias@gesellix.de>2023-01-19 00:24:10 +0300
committerGitHub <noreply@github.com>2023-01-19 00:24:10 +0300
commitd78a1534925e7e424355d214c683e946cbb97d05 (patch)
treec0de2f137a1d25b468093f488245ffd5bffd84dd /src/java/install.sh
parentf7314671e1654cd47263a09b134ddd0286f9eccc (diff)
Java: add Apache Ant (#409)
* Java: add Apache Ant * Update src/java/devcontainer-feature.json Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com> * revert the changes in README.md * Add tests for Java/Ant * Fix Java feature version Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com>
Diffstat (limited to 'src/java/install.sh')
-rw-r--r--src/java/install.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/java/install.sh b/src/java/install.sh
index bf94963..ea43dd3 100644
--- a/src/java/install.sh
+++ b/src/java/install.sh
@@ -14,6 +14,8 @@ INSTALL_GRADLE="${INSTALLGRADLE:-"false"}"
GRADLE_VERSION="${GRADLEVERSION:-"latest"}"
INSTALL_MAVEN="${INSTALLMAVEN:-"false"}"
MAVEN_VERSION="${MAVENVERSION:-"latest"}"
+INSTALL_ANT="${INSTALLANT:-"false"}"
+ANT_VERSION="${ANTVERSION:-"latest"}"
JDK_DISTRO="${JDKDISTRO}"
export SDKMAN_DIR="${SDKMAN_DIR:-"/usr/local/sdkman"}"
@@ -173,6 +175,11 @@ if [ ! -z "${ADDITIONAL_VERSIONS}" ]; then
su ${USERNAME} -c ". ${SDKMAN_DIR}/bin/sdkman-init.sh && sdk default java ${JAVA_VERSION}"
fi
+# Install Ant
+if [[ "${INSTALL_ANT}" = "true" ]] && ! ant -version > /dev/null; then
+ sdk_install ant ${ANT_VERSION}
+fi
+
# Install Gradle
if [[ "${INSTALL_GRADLE}" = "true" ]] && ! gradle --version > /dev/null; then
sdk_install gradle ${GRADLE_VERSION}