mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
gradle: support gradle-wrapper.properties version
Brings our wrapper closer to gradlew's functionality. Updates #98.
This commit is contained in:
parent
12653741cc
commit
737dbc4f0a
1 changed files with 17 additions and 1 deletions
|
@ -30,7 +30,23 @@ v_all=${plugin_v[@]}
|
|||
echo "Available gradle versions: ${v_all[@]}"
|
||||
|
||||
# Earliest takes priority
|
||||
for f in build.gradle ../build.gradle; do
|
||||
for f in {.,..}/gradle/wrapper/gradle-wrapper.properties; do
|
||||
[[ -f $f ]] || continue
|
||||
while read l; do
|
||||
if [[ $l == 'distributionUrl='* ]]; then
|
||||
wrapper_ver=$(echo -n "$l" | sed "s/.*gradle-\\([0-9\\.\\+]\\+\\).*/\\1/")
|
||||
fi
|
||||
done < $f
|
||||
done
|
||||
|
||||
if [[ -n $wrapper_ver ]]; then
|
||||
v_found=$wrapper_ver
|
||||
echo "Found $v_found via distributionUrl"
|
||||
run_gradle
|
||||
fi
|
||||
|
||||
# Earliest takes priority
|
||||
for f in {.,..}/build.gradle; do
|
||||
[[ -f $f ]] || continue
|
||||
while read l; do
|
||||
if [[ -z "$plugin_pver" && $l == *'com.android.tools.build:gradle:'* ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue