Hi again,
I have tested this again with the trunk code and the
mixed-java-native-code sample. I added the APP_ABI := armeabi
armeabi-v7a to the Application.mk (which I also had to add), and indeed
only the armeabi got included in the APK.
However, I've got the feeling the plugin is not dealing with a couple
of things correctly (anymore?) - I know I added the 'target' to the
command line to force a certain build but this seems to not be required
anymore. Simply leaving out the target (as passed to the ndk-build
command), the two libraries get built and also included in the APK but
only the armeabi gets attached to the build.
So, current issues as I see it:
1) Target is passed no matter (should not be required)
2) Libraries are "taken" from the obj directory by the plugin - this
should probably be the libs directory since that is where the final
libraries are placed when using the ndk-build command without a target.
Would also mean the plugin would not need to manually strip the
libraries either - could be taken as is from the libs folder
3) Not all architectures get attached to the build as they should be
A couple of issues with multiple architectures - the classifier seems
to the natural place to indicate the architecture but this will make it
tough to have an .so (for example) that is built with different
capabilities (i.e using defines to include/exclude features -
unfortunately common in native land). Both architectures and
capabilities in this case would have to be signalled using classifiers
and it would get messy trying to coordinate this imho. It is almost
like we should lobby the Maven team for a new tag in the dependency -
architecture. :) Thoughts?
For 3) it would be possible to parse the Application.mk to figure out
what architectures are being built - an easier option would be to simply
trawel the libs folder for libraries matching the 'lib<artifactid>.so'
or 'lib<artifactid>.a' and attach them depending on their parent folder
(armeabi/armeabi-v7a/etc).
Will think about this but any suggestions are outmost welcome.
Cheers,
Johan