Skip to content

Commit

Permalink
Add enable_androidx (#1311)
Browse files Browse the repository at this point in the history
* Add enable_androidx
  • Loading branch information
RobertFlatt authored Apr 22, 2021
1 parent 82ab5b3 commit 6dcbe7a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions buildozer/default.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,13 @@ def build_package(self):
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', '')
Expand Down

0 comments on commit 6dcbe7a

Please sign in to comment.