mirror of
https://github.com/rfrancis/asdf-gradle.git
synced 2024-10-05 13:12:08 +08:00
parent
e47df002ad
commit
c698919361
14
README.md
14
README.md
@ -6,7 +6,7 @@
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
```sh
|
||||
asdf plugin-add gradle https://github.com/rfrancis/asdf-gradle.git
|
||||
```
|
||||
|
||||
@ -15,15 +15,19 @@ asdf plugin-add gradle https://github.com/rfrancis/asdf-gradle.git
|
||||
Check out the [asdf](https://github.com/asdf-vm/asdf) readme for instructions on how to install and manage versions of other tools.
|
||||
|
||||
When installing Gradle using `asdf install` if you not wish to have it check the package signature for whatever reason, you can set `no` using `export GRADLE_SIGNATURE_CHECK=no` example:
|
||||
```
|
||||
|
||||
```sh
|
||||
export GRADLE_SIGNATURE_CHECK=no
|
||||
|
||||
```
|
||||
|
||||
If you want to use a custom distribution url, for example in a corporate setting you can set this:
|
||||
|
||||
```sh
|
||||
export GRADLE_DISTRIBUTION_URL=https://services.gradle.org/distributions
|
||||
```
|
||||
|
||||
Observation:
|
||||
|
||||
* `GRADLE_SIGNATURE_CHECK` - `yes` (for yes, check the signature) is the default
|
||||
|
||||
|
||||
|
||||
NEEDED: Someone to take over maintenance of this plugin.
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
export GRADLE_DISTRIBUTION_URL=${GRADLE_DISTRIBUTION_URL:=https://services.gradle.org/distributions}
|
||||
|
||||
checkShasum ()
|
||||
{
|
||||
local archive_file_name="${1}"
|
||||
@ -30,8 +32,8 @@ installGradleSig()
|
||||
echo "start install $ASDF_INSTALL_VERSION"
|
||||
mkdir -p "$ASDF_INSTALL_PATH"
|
||||
cd "$ASDF_INSTALL_PATH" || exit 1
|
||||
curl -OJL https://services.gradle.org/distributions/gradle-${ASDF_INSTALL_VERSION}-bin.zip
|
||||
curl -OJL https://services.gradle.org/distributions/gradle-${ASDF_INSTALL_VERSION}-bin.zip.sha256
|
||||
curl -OJL ${GRADLE_DISTRIBUTION_URL}/gradle-${ASDF_INSTALL_VERSION}-bin.zip
|
||||
curl -OJL ${GRADLE_DISTRIBUTION_URL}/gradle-${ASDF_INSTALL_VERSION}-bin.zip.sha256
|
||||
archive_file_name=$PWD/gradle-${ASDF_INSTALL_VERSION}-bin.zip
|
||||
authentic_checksum_file=$archive_file_name.sha256
|
||||
authentic_checksum=$(cat $authentic_checksum_file)
|
||||
@ -58,7 +60,7 @@ installGradleNoSign()
|
||||
else
|
||||
mkdir -p "$ASDF_INSTALL_PATH"
|
||||
cd "$ASDF_INSTALL_PATH" || exit 1
|
||||
curl -OJL https://services.gradle.org/distributions/gradle-${ASDF_INSTALL_VERSION}-bin.zip
|
||||
curl -OJL ${GRADLE_DISTRIBUTION_URL}/gradle-${ASDF_INSTALL_VERSION}-bin.zip
|
||||
unzip gradle-${ASDF_INSTALL_VERSION}-bin.zip
|
||||
rm gradle-${ASDF_INSTALL_VERSION}-bin.zip
|
||||
mv gradle-${ASDF_INSTALL_VERSION}/* .
|
||||
|
@ -1,5 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
export LC_ALL=C
|
||||
export GRADLE_DISTRIBUTION_URL=${GRADLE_DISTRIBUTION_URL:=https://services.gradle.org/distributions}
|
||||
|
||||
curl -s https://services.gradle.org/distributions/ | grep -e "distributions.*-bin.zip\"" | sed -e "s#^.*distributions/gradle-##" -e "s#-bin.zip.*##" | sort -t. -n | paste -s -d" " -
|
||||
curl -s ${GRADLE_DISTRIBUTION_URL}/ |
|
||||
grep -e "gradle.*-bin.zip\"" |
|
||||
sed -e "s#^.*gradle-##" -e "s#-bin.zip.*##" |
|
||||
sort -t. -n |
|
||||
paste -s -d" " -
|
||||
|
Loading…
Reference in New Issue
Block a user