'r10e': None,
'r12b': "$ANDROID_NDK",
},
- 'build_tools': "24.0.0",
+ 'build_tools': "24.0.1",
'force_build_tools': False,
'java_paths': None,
'ant': "ant",
pathlist += glob.glob('/System/Library/Java/JavaVirtualMachines/1.[6-9].0.jdk')
pathlist += glob.glob('/Library/Java/JavaVirtualMachines/*jdk*[6-9]*')
if os.getenv('JAVA_HOME') is not None:
- pathlist += os.getenv('JAVA_HOME')
+ pathlist.append(os.getenv('JAVA_HOME'))
if os.getenv('PROGRAMFILES') is not None:
pathlist += glob.glob(os.path.join(os.getenv('PROGRAMFILES'), 'Java', 'jdk1.[6-9].*'))
for d in sorted(pathlist):
m = re.match(regex, j)
if not m:
continue
- osxhome = os.path.join(d, 'Contents', 'Home')
- if os.path.exists(osxhome):
- thisconfig['java_paths'][m.group(1)] = osxhome
- else:
- thisconfig['java_paths'][m.group(1)] = d
+ for p in [d, os.path.join(d, 'Contents', 'Home')]:
+ if os.path.exists(os.path.join(p, 'bin', 'javac')):
+ thisconfig['java_paths'][m.group(1)] = p
for java_version in ('7', '8', '9'):
if java_version not in thisconfig['java_paths']:
props += "sdk.dir=%s\n" % config['sdk_path']
props += "sdk-location=%s\n" % config['sdk_path']
ndk_path = build.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.
+ # if for any reason the path isn't valid or the directory
+ # doesn't exist, some versions of Gradle will error with a
+ # cryptic message (even if the NDK is not even necessary).
# https://gitlab.com/fdroid/fdroidserver/issues/171
- if ndk_path and ndk_path[0] != '$':
+ if ndk_path and os.path.exists(ndk_path):
# Add ndk location
props += "ndk.dir=%s\n" % ndk_path
props += "ndk-location=%s\n" % ndk_path