@Mojo(name="ndk-build",
defaultPhase=COMPILE)
public class NdkBuildMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected String |
additionalCommandline
Specifies additional command line parameters to pass to ndk-build
|
protected org.apache.maven.shared.dependency.graph.DependencyGraphBuilder |
dependencyGraphBuilder
Dependency graph builder component.
|
static String |
ENV_ANDROID_NDK_HOME
The
ANDROID_NDK_HOME environment variable name. |
protected org.apache.maven.project.MavenProject |
project
The maven project.
|
protected org.apache.maven.project.MavenProjectHelper |
projectHelper
Maven ProjectHelper.
|
Constructor and Description |
---|
NdkBuildMojo() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
protected AndroidNdk |
getAndroidNdk()
Returns the Android NDK to use.
|
protected ArtifactResolverHelper |
getArtifactResolverHelper() |
protected NativeHelper |
getNativeHelper() |
public static final String ENV_ANDROID_NDK_HOME
ANDROID_NDK_HOME
environment variable name.@Parameter(property="android.ndk.additionalCommandline") protected String additionalCommandline
@Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project
@Component protected org.apache.maven.project.MavenProjectHelper projectHelper
@Component(hint="default") protected org.apache.maven.shared.dependency.graph.DependencyGraphBuilder dependencyGraphBuilder
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected AndroidNdk getAndroidNdk() throws org.apache.maven.plugin.MojoExecutionException
Returns the Android NDK to use.
Current implementation looks for <ndk><path>
configuration in pom, then System
property android.ndk.path
, then environment variable ANDROID_NDK_HOME
.
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.
org.apache.maven.plugin.MojoExecutionException
- if no Android NDK path configuration is available at all.protected final ArtifactResolverHelper getArtifactResolverHelper()
protected final NativeHelper getNativeHelper()
Copyright © 2014–2016 simpligility technologies inc.. All rights reserved.