Skip to content

Commit

Permalink
🔥 Remove the manual gradle installation
Browse files Browse the repository at this point in the history
While investigating the issues with SSL errors, I discovered that cordova
doesn't use the system gradle, but configures `build.gradle` so that the
correct version of gradle is downloaded and installed on the first run.

This means that we don't need to install gradle manually, which in turn, means
that we don't need to install sdkman so that we install the pinned version of
gradle.

Yay for simplifying code and removing dependencies!
e-mission/e-mission-docs#1079 (comment)
  • Loading branch information
shankari committed Aug 27, 2024
1 parent a7539e9 commit 399e9e7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
3 changes: 0 additions & 3 deletions setup/activate_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ then
echo "ANDROID_HOME and ANDROID_SDK_ROOT not set, android SDK not found"
fi

echo "Activating sdkman, and by default, gradle"
source ~/.sdkman/bin/sdkman-init.sh

echo "Ensuring that we use the most recent version of the command line tools"
export PATH=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/emulator:$PATH

Expand Down
1 change: 0 additions & 1 deletion setup/export_shared_dep_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export NPM_VERSION=10.8.2
# Looks like brew supports only major and minor, not patch version
export RUBY_VERSION=3.0
export COCOAPODS_VERSION=1.15.2
export GRADLE_VERSION=8.10
export OSX_EXP_VERSION=12

export NVM_DIR="$HOME/.nvm"
Expand Down
15 changes: 0 additions & 15 deletions setup/setup_android_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,4 @@ else
echo "ANDROID_HOME = $ANDROID_HOME; ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT"
fi

echo "Setting up sdkman"
curl -s "https://get.sdkman.io" | bash
source ~/.sdkman/bin/sdkman-init.sh

CURR_GRADLE_VER=`sdk current gradle | cut -d " " -f 4 | xargs`

echo "CURR_GRADLE_VER = '$CURR_GRADLE_VER', expected $GRADLE_VERSION"

if [[ $CURR_GRADLE_VER == $GRADLE_VERSION ]]; then
echo "Already have gradle version $GRADLE_VERSION"
else
echo "Setting up gradle using SDKMan"
sdk install gradle $GRADLE_VERSION
fi

source setup/setup_shared_native.sh

0 comments on commit 399e9e7

Please sign in to comment.