src/main/java/com/simpligility/maven/plugins/android/AbstractAndroidMojo.java
protected AndroidNdk getAndroidNdk() throws MojoExecutionException
    {
        File chosenNdkPath;
        // There is no <ndk> tag in the pom.
        if ( ndkPath != null )
        {
            // -Dandroid.ndk.path is set on command line, or via <properties><ndk.path>...
            chosenNdkPath = ndkPath;
        }
        else if ( ndk != null && ndk.getPath() != null )
        {
            chosenNdkPath = ndk.getPath();
        }
        else
        {
            // No -Dandroid.ndk.path is set on command line, or via <properties><ndk.path>...
            chosenNdkPath = new File( getAndroidNdkHomeOrThrow() );
        }
        return new AndroidNdk( chosenNdkPath );
    }
protected AndroidNdk getAndroidNdk() throws MojoExecutionException
    {
        File chosenNdkPath;
        // There is no <ndk> tag in the pom.
        if ( ndkPath != null )
        {
            // -Dandroid.ndk.path is set on command line, or via <properties><ndk.path>...
            chosenNdkPath = ndkPath;
        }
        else if ( ndk != null && ndk.getPath() != null )
        {
            chosenNdkPath = ndk.getPath();
        }
        else
        {
            // No -Dandroid.ndk.path is set on command line, or via <properties><ndk.path>...
            chosenNdkPath = new File( getAndroidNdkHomeOrThrow() );
        }
        return new AndroidNdk( chosenNdkPath );
    }
<p>Returns the Android NDK to use.</p>

<p>Current implementation looks for <code>&lt;ndk&gt;&lt;path&gt;</code> configuration in pom, then System
property <code>android.ndk.path</code>, then environment variable <code>ANDROID_NDK_HOME</code>.

<p>This is where we collect all logic for how to lookup where it is, and which one to choose. The lookup is
based on available parameters. This method should be the only one you should need to look at to understand how
the Android NDK is chosen, and from where on disk.</p>

@return the Android NDK to use.
@throws org.apache.maven.plugin.MojoExecutionException
if no Android NDK path configuration is available at all.