3

Is there a way to have gradle generate the headers + implementation of an AIDL file for native code (android NDK)? I followed the instructions here (https://developer.android.com/guide/components/aidl) but this only generates code for java/kotlin code. It doesn't generate anything for native code (c++).

I was able to generate the headers + implementation manually using the "aidl" tool as described here (https://source.android.com/devices/architecture/aidl/aidl-backends) but I was hoping there was a way to do this through gradle so that this is taken care of for me.

Thanks!

Jon
  • 1,381
  • 3
  • 16
  • 41
  • 2
    Put your commands to script (run "aidl" tool) and run it like prebuilt task: https://stackoverflow.com/questions/25562207/execute-shell-script-in-gradle – Mykola Khyliuk Dec 07 '20 at 13:00
  • Thanks @NikolayKhilyuk, this is the solution I ended up going with. – Jon Dec 21 '20 at 04:19

0 Answers0