Add enable_androidx (#1311)

* Add enable_androidx
This commit is contained in:
RobertF 2021-04-21 21:04:19 -10:00 committed by GitHub
parent 82ab5b3f48
commit 6dcbe7ab9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -162,6 +162,11 @@ fullscreen = 0
# (list) Gradle dependencies to add
#android.gradle_dependencies =
# (bool) Enable AndroidX support. Enable when 'android.gradle_dependencies'
# contains an 'androidx' package, or any package from Kotlin source.
# android.enable_androidx requires android.api >= 28
#android.enable_androidx = False
# (list) add java compile options
# this can for example be necessary when importing certain java libraries using the 'android.gradle_dependencies' option
# see https://developer.android.com/studio/write/java8-support for further information

View file

@ -1167,6 +1167,13 @@ class TargetAndroid(Target):
if wakelock:
build_cmd += [("--wakelock", )]
# AndroidX ?
enable_androidx = config.getbooldefault('app',
'android.enable_androidx',
False)
if enable_androidx:
build_cmd += [("--enable-androidx", )]
# intent filters
intent_filters = config.getdefault(
'app', 'android.manifest.intent_filters', '')