Skip to content

Commit

Permalink
fix: dependencies.sh to work with Java 17 (googleapis#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
suztomo committed Mar 17, 2022
1 parent 2fa3c8b commit 3a82fd3
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .kokoro/dependencies.sh
Expand Up @@ -37,16 +37,13 @@ function determineMavenOpts() {
| sed -E 's/^.*"(.*?)".*$/\1/g' \
| sed -E 's/^(1\.[0-9]\.0).*$/\1/g'
)

case $javaVersion in
"17")
if [[ $javaVersion == 17* ]]
then
# MaxPermSize is no longer supported as of jdk 17
echo -n "-Xmx1024m"
;;
*)
else
echo -n "-Xmx1024m -XX:MaxPermSize=128m"
;;
esac
fi
}

export MAVEN_OPTS=$(determineMavenOpts)
Expand Down

0 comments on commit 3a82fd3

Please sign in to comment.