Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
list all known Android NDK versions as seen by fdroid/android-sdk-transparency-log
import re, requests
NDK_VERSION_NUMBER_REGEX = re.compile(r'[1-9][0-9]*\.[0-9]+\.[0-9]{7}(?:-[a-z0-9]+)?')
NDK_VERSION_REGEX = re.compile(r"""ndkVersion\s*[= ]\s*['"]([1-9][0-9]*\.[0-9]+\.[0-9]{7}(?:-[a-z0-9]+)?)["']""")
r = requests.get('')
data = r.json()
for url, entries in data.items():
for d in entries:
if url.startswith(''):
m ='Pkg.Revision = .*', d.get('', ''))
if m:
ndk_version =
print(ndk_version, end='\t\t')
v =
for build_gradle_snippet in (
'ndkVersion "%s"' % v,
"ndkVersion '%s'" % v,
'ndkVersion="%s"' % v,
'android.ndkVersion "%s"' % v,
n =
if n:
assert( == v)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment