Skip to content

Commit c023523

Browse files
RobertFlattRobertFlatt
authored andcommitted
Enable AndroidX
1 parent f2fff78 commit c023523

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

doc/source/buildoptions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ options (this list may not be exhaustive):
9292
run. See :ref:`arbitrary_scripts_services`.
9393
- ``--add-source``: Add a source directory to the app's Java code.
9494
- ``--no-compile-pyo``: Do not optimise .py files to .pyo.
95+
- ``--enable-androidx``: Enable the AndroidX support library.
9596

9697

9798
webview

pythonforandroid/bootstraps/common/build/build.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ def make_package(args):
327327
join(res_dir, 'drawable/icon.png')
328328
)
329329

330+
if args.enable_androidx:
331+
shutil.copy('templates/gradle.properties','gradle.properties')
332+
330333
if get_bootstrap_name() != "service_only":
331334
lottie_splashscreen = join(res_dir, 'raw/splashscreen.json')
332335
if args.presplash_lottie:
@@ -679,6 +682,10 @@ def parse_args_and_make_package(args=None):
679682
'topics/manifest/'
680683
'activity-element.html'))
681684

685+
ap.add_argument('--enable-androidx', dest='enable_androidx',
686+
action='store_true',
687+
help=('Enable the AndroidX support library, '
688+
'requires api = 28 or greater'))
682689
ap.add_argument('--android-entrypoint', dest='android_entrypoint',
683690
default='org.kivy.android.PythonActivity',
684691
help='Defines which java class will be used for startup, usually a subclass of PythonActivity')
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
android.useAndroidX=true
2+
android.enableJetifier=true

0 commit comments

Comments
 (0)