add support for gradle kotlin scripts

https://guides.gradle.org/migrating-build-logic-from-groovy-to-kotlin/
Closes fdroid/fdroidserver#613

cherry-picked from Bubu/fdroidserver@7d2e9f9c
This commit is contained in:
Marcus Hoffmann 2019-12-23 02:02:28 +01:00 committed by Hans-Christoph Steiner
parent 3de2d0f56f
commit 9ae41cc1ff
5 changed files with 21 additions and 9 deletions

View file

@ -174,7 +174,7 @@ if [[ -n $wrapper_ver ]]; then
fi
# Earliest takes priority
for f in {.,..}/build.gradle; do
for f in {.,..}/build.gradle{,.kts}; do
[[ -f $f ]] || continue
while IFS='' read -r line || [ -n "$line" ]; do
if [[ -z "$plugin_pver" && $line == *'com.android.tools.build:gradle:'* ]]; then