jayway/maven-android-plugin — pull request #162 by tptak (2012-12-22 01:05:43+00:00)
Title: Read  &lt;ndk>&lt;path>&lt;/path>&lt;/ndk> setting when resolving AndroidNdk

NOTE: this is a first change on this branch. I'm still a noob on the git field, and I think I should be able to continue work on this branch after this pull request is fullfilled. If not - reject this and I will either send a new branch with these changes or send it in bulk after I finish everything.

Change comment
- I did some debugging and found out that the <ndk><path></path></ndk> setting was simply ignored during Ndk builds. This is what this fix is for.
- I checked this on native sample projects (BTW, the testAppearance ConfigureMorseActivityTest.testAppearance cries about the INJECT_EVENTS permission and I couldn't build everything from sample projects beacuse of it)
- I was also thinking whether it would be useful to create a field for output of getAndroidNdk, where on first call it would be defined and afterwards the first result would be returned (the proper AndroidNdk object reference). I haven't done it but I may try to add it in two or three days if you think it is a good idea

Changes commited:
- Added getters and setters to NDK,
- Moved NDK ndk field from NdkBuildMojo to AbstractAndroidMojo,
- Added ndk.getPath() (the <ndk><path></path></ndk>) to getAndroidNdk implementation,
- changed so that:
- - if a command line parameter android.ndkpath is available, it gets picked first, then
- - if <ndk><path></path></ndk> is available it gets picked, then
- - if an ANDROID_NDK_HOME env var is available, it gets picked
- I also changed the description of order in javadocs.