Giter Club home page Giter Club logo

ausweisapp2aar's Introduction

AusweisApp2AAR

Multi-Arch AAR Building of @Governikus AusweisApp2 SDK

AusweisApp2 SDK does support arm64-v8a only. The AAR generated by this project contains the armeabi-v7a shared libraries as well.

This project uses the artifacts generated by https://github.com/AxelNennker/AusweisApp2/blob/community/.gitlab-ci.yml and generates an AAR that supports armeabi-v7a and arm64-v8a.

Steps

  • create the artifacts
  • copy AusweisApp2-artifacts/workspace/arm64-v8a/build/dist/ to e.g. AusweisApp2AAR
  • create AusweisApp2AAR/armeabi-v7a
  • populate AusweisApp2AAR/armeabi-v7a with the shared libraries. Copy these from AusweisApp2-artifacts/workspace/armeabi-v7a/buildlibs/dist/lib/
$ ls -1R libs
QtAndroid.jar
QtAndroidExtras.jar
QtAndroidNetwork.jar
QtNfc.jar
arm64-v8a
armeabi-v7a

libs/arm64-v8a:
libAusweisApp2_arm64-v8a.so
libQt5AndroidExtras_arm64-v8a.so
libQt5Concurrent_arm64-v8a.so
libQt5Core_arm64-v8a.so
libQt5Gui_arm64-v8a.so
libQt5Network_arm64-v8a.so
libQt5Nfc_arm64-v8a.so
libc++_shared.so
libcrypto_arm64-v8a.so
libplugins_imageformats_qgif_arm64-v8a.so
libplugins_imageformats_qicns_arm64-v8a.so
libplugins_imageformats_qico_arm64-v8a.so
libplugins_imageformats_qjpeg_arm64-v8a.so
libplugins_platforms_qtforandroid_arm64-v8a.so
libssl_arm64-v8a.so

libs/armeabi-v7a:
libAusweisApp2_armeabi-v7a.so
libQt5AndroidExtras_armeabi-v7a.so
libQt5Concurrent_armeabi-v7a.so
libQt5Core_armeabi-v7a.so
libQt5Gui_armeabi-v7a.so
libQt5Network_armeabi-v7a.so
libQt5Nfc_armeabi-v7a.so
libc++_shared.so
libcrypto_armeabi-v7a.so
libplugins_imageformats_qgif_armeabi-v7a.so
libplugins_imageformats_qicns_armeabi-v7a.so
libplugins_imageformats_qico_armeabi-v7a.so
libplugins_imageformats_qjpeg_armeabi-v7a.so
libplugins_platforms_qtforandroid_armeabi-v7a.so
libssl_armeabi-v7a.so

  • mkdir AusweisApp2AAR/qt5AndroidDir and subdirectories res and src
  • cp -r AusweisApp2-artifacts/workspace/armeabi-v7a/buildlibs/dist/src/android/java/res/* to res
  • cp -r AusweisApp2-artifacts/workspace/armeabi-v7a/buildlibs/dist/src/android/java/src/* to src
  • set the Android SDK in local.properties
  • Remove the path to qt5AndroidDir in gradle.properties. Review the values in gradle.properties
$ cat gradle.properties 
android.useAndroidX=true
androidBuildToolsVersion=30.0.3
androidCompileSdkVersion=31
buildDir=build
qt5AndroidDir=qt5AndroidDir
qtMinSdkVersion=21
qtTargetSdkVersion=30

  • remove jcenter and add mavenCentral
  • updated gradle
  • update dependencies
  • ./gradlew clean
  • ./gradlew assembleRelease
    • The aar is not in the build folder build/outputs/aar/AusweisApp2AAR-release.aar
    • The aar contains the shared libraries for both arm64-v7a and armeabi-v7a
unzip -t AusweisApp2AAR-release.aar
... snip
    testing: jni/arm64-v8a/           OK
    testing: jni/arm64-v8a/libAusweisApp2_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libQt5AndroidExtras_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libQt5Concurrent_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libQt5Core_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libQt5Gui_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libQt5Network_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libQt5Nfc_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libc++_shared.so   OK
    testing: jni/arm64-v8a/libcrypto_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libplugins_imageformats_qgif_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libplugins_imageformats_qicns_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libplugins_imageformats_qico_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libplugins_imageformats_qjpeg_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libplugins_platforms_qtforandroid_arm64-v8a.so   OK
    testing: jni/arm64-v8a/libssl_arm64-v8a.so   OK
    testing: jni/armeabi-v7a/         OK
    testing: jni/armeabi-v7a/libAusweisApp2_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libQt5AndroidExtras_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libQt5Concurrent_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libQt5Core_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libQt5Gui_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libQt5Network_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libQt5Nfc_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libc++_shared.so   OK
    testing: jni/armeabi-v7a/libcrypto_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libplugins_imageformats_qgif_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libplugins_imageformats_qicns_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libplugins_imageformats_qico_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libplugins_imageformats_qjpeg_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libplugins_platforms_qtforandroid_armeabi-v7a.so   OK
    testing: jni/armeabi-v7a/libssl_armeabi-v7a.so   OK
... snip

I am going to improve the .gitlab-ci.yml file to do more of these manual steps - later

ausweisapp2aar's People

Contributors

axelnennker avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.