1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-02 07:20:37 +02:00

gradlew-fdroid: use last duplicate key like java.util.Properties

This commit is contained in:
FC Stegerman 2023-05-19 18:12:23 +02:00
parent a9b2f624e5
commit f160ae55cb
No known key found for this signature in database
GPG Key ID: B218FF2C27FC6CC6

View File

@ -213,7 +213,8 @@ plugin_v=(8.1.1 8.1 8.0.2 8.0.1 8.0 7.6.1 7.6 7.5.1 7.5 7.4.2 7.4.1 7.4 7.3.3 7.
v_all=${plugin_v[@]}
# Earliest takes priority
# Earliest file takes priority
# Last key takes priority if there are duplicates (matching java.util.Properties)
for f in {.,..}/gradle/wrapper/gradle-wrapper.properties; do
[[ -f $f ]] || continue
while IFS='' read -r line || [ -n "$line" ]; do
@ -221,9 +222,9 @@ for f in {.,..}/gradle/wrapper/gradle-wrapper.properties; do
if [[ $line == 'distributionUrl='* ]]; then
wrapper_ver=${line#*/gradle-}
wrapper_ver=${wrapper_ver%-*.zip}
break 2
fi
done < $f
[[ -n $wrapper_ver ]] && break
done
if [[ -n $wrapper_ver ]]; then