1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Build support for android:

- android support library replaced by androidx appcompat
This commit is contained in:
lufebe16 2022-11-21 16:33:21 +01:00
parent 3ed6bcf984
commit 4e0add4e5d
3 changed files with 7 additions and 10 deletions

View file

@ -23,14 +23,6 @@ cp -a ../pysollib ${tmpdir}
cp -a ../scripts ${tmpdir}
cp -a ../pysol.py ${tmpdir}
if [ ! -f support-v4-24.1.1.aar ]
then
packageurl="https://maven.google.com/com/android/support/support-v4/24.1.1"
packagename="support-v4-24.1.1.aar"
wget -nv ${packageurl}/${packagename}
fi
cp -a support-v4-24.1.1.aar ${tmpdir}
cp -a main.py ${tmpdir}
mkdir -p ${tmpdir}/data/images/cards/bottoms/trumps-only
echo "" > ${tmpdir}/data/images/cards/bottoms/trumps-only/.keep

View file

@ -180,7 +180,7 @@ android.api = 32
#android.add_src =
# (list) Android AAR archives to add
android.add_aars = %(source.dir)s/support-v4-24.1.1.aar
#android.add_aars =
# (list) Put these files or directories in the apk assets directory.
# Either form may be used, and assets need not be in 'source.include_exts'.
@ -190,11 +190,14 @@ android.add_aars = %(source.dir)s/support-v4-24.1.1.aar
# (list) Gradle dependencies to add
#android.gradle_dependencies =
android.gradle_dependencies =
androidx.appcompat:appcompat:1.4.2
# (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
android.enable_androidx = True
# (list) add java compile options
# this can for example be necessary when importing certain java libraries using the 'android.gradle_dependencies' option

View file

@ -13,6 +13,8 @@ except ImportError:
# LB190927.
# wait loop removed. (Implement it in external code if needed.)
# LB191011.
# supportlib replaced by androidx.appcompat
# LB221121.
class AndroidPerms(object):
@ -22,7 +24,7 @@ class AndroidPerms(object):
self.PythonActivity = jnius.autoclass(
'org.kivy.android.PythonActivity')
self.Compat = jnius.autoclass(
'android.support.v4.content.ContextCompat')
'androidx.core.content.ContextCompat')
self.currentActivity = jnius.cast(
'android.app.Activity', self.PythonActivity.mActivity)