public class NativeHelper extends Object
Modifier and Type | Field and Description |
---|---|
static int |
NDK_REQUIRED_VERSION |
Constructor and Description |
---|
NativeHelper(org.apache.maven.project.MavenProject project,
org.apache.maven.shared.dependency.graph.DependencyGraphBuilder dependencyGraphBuilder,
org.apache.maven.plugin.logging.Log log) |
Modifier and Type | Method and Description |
---|---|
static boolean |
artifactHasHardwareArchitecture(org.apache.maven.artifact.Artifact artifact,
String ndkArchitecture,
String defaultArchitecture)
Helper method for determining whether the specified architecture is a match for the
artifact using its classifier.
|
static String |
extractArchitectureFromArtifact(org.apache.maven.artifact.Artifact artifact,
String defaultArchitecture)
Extracts, if embedded correctly, the artifacts architecture from its classifier.
|
static String[] |
getAppAbi(File applicationMakefile) |
Set<org.apache.maven.artifact.Artifact> |
getNativeDependenciesArtifacts(boolean sharedLibraries) |
static String[] |
getNdkArchitectures(String ndkArchitectures,
String applicationMakefile,
File basedir)
Attempts to extract, from various sources, the applicable list of NDK architectures to support
as part of the build.
|
static boolean |
hasSharedNativeLibraryArtifact(Set<org.apache.maven.artifact.Artifact> resolveNativeLibraryArtifacts) |
static boolean |
hasStaticNativeLibraryArtifact(Set<org.apache.maven.artifact.Artifact> resolveNativeLibraryArtifacts) |
static boolean |
isNativeArtifactProject(org.apache.maven.project.MavenProject mavenProject)
Checks whether or not the specified project provides a native library artifact as its primary artifact.
|
static File[] |
listNativeFiles(org.apache.maven.artifact.Artifact artifact,
File unpackDirectory,
boolean staticLibrary,
String architecture) |
static void |
validateNDKVersion(File ndkHomeDir) |
static void |
validateNDKVersion(int desiredVersion,
String versionStr) |
public static final int NDK_REQUIRED_VERSION
public NativeHelper(org.apache.maven.project.MavenProject project, org.apache.maven.shared.dependency.graph.DependencyGraphBuilder dependencyGraphBuilder, org.apache.maven.plugin.logging.Log log)
public static boolean hasStaticNativeLibraryArtifact(Set<org.apache.maven.artifact.Artifact> resolveNativeLibraryArtifacts)
public static boolean hasSharedNativeLibraryArtifact(Set<org.apache.maven.artifact.Artifact> resolveNativeLibraryArtifacts)
public Set<org.apache.maven.artifact.Artifact> getNativeDependenciesArtifacts(boolean sharedLibraries) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public static void validateNDKVersion(File ndkHomeDir) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public static void validateNDKVersion(int desiredVersion, String versionStr) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public static String extractArchitectureFromArtifact(org.apache.maven.artifact.Artifact artifact, String defaultArchitecture)
artifact
- The artifact to retrieve the classifier from.defaultArchitecture
- The architecture to return if can't be resolved from the classifierdefaulArchitecture
if not resolveablepublic static String[] getNdkArchitectures(String ndkArchitectures, String applicationMakefile, File basedir) throws org.apache.maven.plugin.MojoExecutionException
ndkArchitectures
- Space separated list of architectures. This may be from configuration or otherwiseapplicationMakefile
- The makefile (Application.mk) to retrieve the list from.basedir
- Directory the build is running from (to resolve files)org.apache.maven.plugin.MojoExecutionException
public static boolean artifactHasHardwareArchitecture(org.apache.maven.artifact.Artifact artifact, String ndkArchitecture, String defaultArchitecture)
ndkArchitecture
- Architecture to check for matchartifact
- Artifact to check the classifier match forpublic static boolean isNativeArtifactProject(org.apache.maven.project.MavenProject mavenProject)
mavenProject
- Project to checkCopyright © 2014–2016 simpligility technologies inc.. All rights reserved.