From dee3e850982def59ef657ca8c89f89cc29bb78fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Mon, 25 Jul 2016 13:07:46 +0200 Subject: [PATCH] common: don't insert $ANDROID_NDK to local.props See the comment. Updates #171. --- fdroidserver/common.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index e337a7f1..9f7e6c1b 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1373,7 +1373,12 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver= props += "sdk.dir=%s\n" % config['sdk_path'] props += "sdk-location=%s\n" % config['sdk_path'] ndk_path = build.ndk_path() - if ndk_path: + # if it wasn't expanded correctly (because the NDK is not + # installed or $ANDROID_NDK not set properly), don't insert it. + # even if not actually used, Gradle will error with a cryptic + # message. + # https://gitlab.com/fdroid/fdroidserver/issues/171 + if ndk_path and ndk_path[0] != '$': # Add ndk location props += "ndk.dir=%s\n" % ndk_path props += "ndk-location=%s\n" % ndk_path -- 2.30.2