Skip to content

Commit

Permalink
Merge pull request #19 from iguessthislldo/igtd/android-java
Browse files Browse the repository at this point in the history
Use Correct Variables With `use_java=true`
  • Loading branch information
iguessthislldo authored Oct 7, 2024
2 parents cd06b8b + 6c71540 commit 0291bce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
8 changes: 7 additions & 1 deletion configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ then
else
extra_configure_flags+=("--java=${jdk}")
fi
extra_configure_flags+=("--macros=ANDROID_API_PATH=$ANDROID_SDK/platforms/android-$target_api")

android_jar="$android_sdk/platforms/android-$android_target_api/android.jar"
if [ ! -f "$android_jar" ]
then
echo "Error: $android_jar doesn't exist, check that android_sdk and android_target_api are correct" 1>&2
exit 1
fi
fi

if $use_security
Expand Down
11 changes: 8 additions & 3 deletions setenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,15 @@ export PATH=${PATH}:"$ACE_ROOT/bin"
export use_java=${use_java:-false}
if $use_java
then
export ANDROID_SDK="${ANDROID_SDK-"${workspace}/android-sdk"}"
if [ -z ${target_api+x} ]
export android_sdk="${ANDROID_SDK-"${workspace}/android-sdk"}"
if [ ! -z ${android_target_api+x} ]
then
echo "Error: use_java is true, but target_api isn't set" 1>&2
export target_api="$android_target_api"
elif [ ! -z ${target_api+x} ]
then
export android_target_api="$target_api"
else
echo "Error: use_java is true, but android_target_api isn't set" 1>&2
exit 1
fi
fi
Expand Down

0 comments on commit 0291bce

Please sign in to comment.