HawtJNI, Android Studio and gradle

54 views
Skip to first unread message

Mikko Virkkilä

unread,
Sep 17, 2014, 6:18:28 AM9/17/14
to haw...@googlegroups.com
Hi,

I was planning to migrate an Android library from using SWIG to using HawtJNI and I've run into some challenges.

After figuring out (partly) how gradle works and how Android Studios build process works, it would appear that the NDK build step (which compiles the *.so) happens almost at the start of the build process, before any .class files have been compiled. If I've understood correctly, HawtJNI's generator uses introspection to extract information from the compiled class files and uses that information to generate JNI C code. This would seem to indicate that there is no way to combine HawtJNI to generate C code before the NDK's build step happens.

I'm using HawtJNI 1.10, Android Studio 0.8.10 beta with build tools 20, and the gradle version 1.12. 

Has anyone integrated HawtJNI C generation into the normal build process of Android Studio?

Thanks,

Mikko
Reply all
Reply to author
Forward
0 new messages