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

@ -299,7 +299,8 @@ def main():
app.Categories = options.categories.split(',')
if os.path.exists(os.path.join(subdir, 'jni')):
build.buildjni = ['yes']
if os.path.exists(os.path.join(subdir, 'build.gradle')):
if os.path.exists(os.path.join(subdir, 'build.gradle')) \
or os.path.exists(os.path.join(subdir, 'build.gradle')):
build.gradle = ['yes']
package_json = os.path.join(build_dir, 'package.json') # react-native