androidenv: update jdk to 17

This commit is contained in:
Hadi 2024-11-05 16:32:08 -05:00
parent 67343f664b
commit ded820fb03
No known key found for this signature in database
GPG Key ID: 416AD9E8E372C075

View File

@ -18,14 +18,14 @@ deployAndroidPackage {
# Wrap all scripts that require JAVA_HOME
find $ANDROID_SDK_ROOT/${package.path}/bin -maxdepth 1 -type f -executable | while read program; do
if grep -q "JAVA_HOME" $program; then
wrapProgram $program --prefix PATH : ${pkgs.jdk11}/bin \
wrapProgram $program --prefix PATH : ${pkgs.jdk17}/bin \
--prefix ANDROID_SDK_ROOT : $ANDROID_SDK_ROOT
fi
done
# Wrap sdkmanager script
wrapProgram $ANDROID_SDK_ROOT/${package.path}/bin/sdkmanager \
--prefix PATH : ${lib.makeBinPath [ pkgs.jdk11 ]} \
--prefix PATH : ${lib.makeBinPath [ pkgs.jdk17 ]} \
--add-flags "--sdk_root=$ANDROID_SDK_ROOT"
# Patch all script shebangs