Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new "prefab" AAR format #4436

Open
atsushieno opened this issue Mar 20, 2020 · 1 comment
Open

Support new "prefab" AAR format #4436

atsushieno opened this issue Mar 20, 2020 · 1 comment
Assignees
Labels
enhancement Proposed change to current functionality.

Comments

@atsushieno
Copy link
Contributor

atsushieno commented Mar 20, 2020

Starting with Android Gradle Plugin 4.0 Canary 9, Google has introduced a completely new AAR archive format called "prefab" which is to bundle native libraries as well as header files, so that (for AGP) adding simple reference to the Maven artifact ID will automatically resolve those header files when AGP builds a referencing project that depends on such an AAR.

https://developer.android.com/studio/preview/features?buildsystem=cmake#native-dependencies

It already takes place in some libraries. For example, see https://github.com/google/oboe/blob/master/docs/GettingStarted.md#option-1-using-pre-built-binaries-and-headers

Below you will find how such an AAR looks different from former ones:

$ unzip -l ~/Downloads/oboe-1.3.0.aar
Archive:  /home/atsushi/Downloads/oboe-1.3.0.aar
  Length      Date    Time    Name
---------  ---------- -----   ----
      227  2020-02-14 19:39   AndroidManifest.xml
...
     3912  2019-10-18 21:27   prefab/modules/oboe/include/oboe/LatencyTuner.h
     3072  2020-02-20 02:48   prefab/modules/oboe/include/oboe/Version.h
...
     1106  2019-10-18 21:27   prefab/modules/oboe/include/oboe/Oboe.h
    16390  2020-02-20 02:48   prefab/modules/oboe/include/oboe/Definitions.h
...
  1935088  2020-02-20 03:06   prefab/modules/oboe/libs/android.x86_64/liboboe.so
       53  2020-02-14 07:48   prefab/modules/oboe/libs/android.x86_64/abi.json
        0  2020-02-20 03:05   prefab/modules/oboe/libs/android.arm64-v8a/
     6148  2020-02-20 02:57   prefab/modules/oboe/libs/android.arm64-v8a/.DS_Store
  1981584  2020-02-20 03:05   prefab/modules/oboe/libs/android.arm64-v8a/liboboe.so
       56  2020-02-14 07:48   prefab/modules/oboe/libs/android.arm64-v8a/abi.json
...
      137  2020-02-14 00:10   prefab/modules/oboe/module.json
       95  2020-02-14 00:55   prefab/prefab.json
---------                     -------
  8607500                     38 files

You will most likely have to support those new AAR packages to build bindings.

@atsushieno
Copy link
Contributor Author

FYI microsoft/vcpkg#10271

@jpobst jpobst added enhancement Proposed change to current functionality. and removed feature-request labels Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Proposed change to current functionality.
Projects
None yet
Development

No branches or pull requests

5 participants