Fork me on GitHub

android-ndk:ndk-build

Full name:

com.simpligility.maven.plugins:android-ndk-maven-plugin:1.1.2:ndk-build

Description:

(no description)

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: compile.

Optional Parameters

Name Type Since Description
additionalCommandline String - Specifies additional command line parameters to pass to ndk-build
User property is: android.ndk.additionalCommandline.
additionallyBuiltModules List - (no description)
allowMultiArtifacts boolean - Flag indicating whether or not multiple number of native libraries should be included
Default value is: false.
applicationMakefile String - Specifies the application makefile to use for the build (if other than the default Application.mk).
User property is: android.ndk.applicationMakefile.
architectureToolchainMappings ArchitectureToolchainMappings - Defines the architecture to toolchain mappings for the NDK build <architectureToolchainMappings> <x86>x86-4.7</x86> <armeabi>arm-linux-androideabi-4.7</armeabi> </architectureToolchainMappings>
architectures String - Defines the architectures for the NDK build - this is a space separated list (i.e x86 armeabi)
User property is: android.ndk.architectures.
attachHeaderFiles Boolean - Flag indicating whether the header files used in the build should be included and attached to the build as an additional artifact.
Default value is: true.
User property is: android.ndk.attachHeaderFiles.
attachLibrariesArtifacts Boolean - Flag indicating whether the final artifacts should be included and attached to the build as an artifact.
Default value is: true.
User property is: android.ndk.attachLibrariesArtifacts.
buildWarningsRegularExpression String - Defines the regular expression used to detect whether error/warning output from ndk-build is a minor compile warning or is actually an error which should cause the build to fail. If the pattern matches, the output from the compiler will not be considered an error and compile will be successful.
Default value is: .*[warning|note]: .*.
User property is: android.ndk.buildWarningsRegularExpression.
classifier String - Specifies the classifier with which the artifact should be stored in the repository
User property is: android.ndk.classifier.
finalLibraryName String - Specifies the final name of the library output by the build (this allows the pom to override the default artifact name). The value should not include the 'lib' prefix or filename extension (e.g. '.so').
User property is: android.ndk.finalLibraryName.
headerFilesDirectives List - Specifies the set of header files includes/excludes which should be used for bundling the exported header files. The below shows an example of how this can be used.
<headerFilesDirectives>
  <headerFilesDirective>
    <directory>${basedir}/jni/include</directory>
    <includes>
      <includes>**\/*.h</include>
    </includes>
  <headerFilesDirective>
</headerFilesDirectives>

If no headerFilesDirectives is specified, the default includes will be defined as shown below:
<headerFilesDirectives>
  <headerFilesDirective>
    <directory>${basedir}/jni</directory>
    <includes>
      <includes>**\/*.h</include>
    </includes>
    <excludes>
      <exclude>**\/*.c</exclude>
    </excludes>
  <headerFilesDirective>
  [..]
</headerFilesDirectives>

ignoreBuildWarnings Boolean - Flag indicating whether warnings should be ignored while compiling. If true, the build will not fail if warning are found during compile.
Default value is: true.
User property is: android.ndk.ignoreBuildWarnings.
ignoreHeaderFilesArchives List - Specifies a set of group/artifact identifiers for which header archives should not be attempted to be resolved. This is useful when a static library dependcy on other static libraries but the headers of those libraries are not necessarily available. This allows the plugin to exclude the retrieval of those header archives
  <ignoreHeaderFilesArchives>
    <ignoreHeaderFilesArchive>
      <groupId>com.insidesecure.drm.agent.android</groupId>
      <artifactId>expat-static-lib</artifactId>
    </ignoreHeaderFilesArchive>
    <ignoreHeaderFilesArchive>
      <groupId>com.insidesecure.drm.agent.android</groupId>
      <artifactId>pcre-static-</artifactId>
    </ignoreHeaderFilesArchive>
  </ignoreHeaderFilesArchives>

leaveTemporaryBuildArtifacts Boolean - Flag indicating whether temporary build artifacts are removed after a build
Default value is: false.
User property is: android.ndk.leaveTemporaryBuildArtifacts.
librariesOutputDirectory File -

Folder containing native, static libraries compiled and linked by the NDK.


Default value is: ${project.build.directory}/ndk-libs.
User property is: android.ndk.librariesOutputDirectory.
makefile String - Specifies the makefile to use for the build (if other than the default Android.mk).
User property is: android.ndk.makefile.
maxJobs Boolean - Flag indicating whether to use the max available jobs for the host machine
Default value is: false.
User property is: android.ndk.maxJobs.
ndkBuildExecutable String - Allows for overriding the default ndk-build executable.
User property is: android.ndk.ndkBuildExecutable.
ndkToolchain String - Specifies the NDK toolchain to use for the build. This will be using the NDK_TOOLCHAIN define on the ndk-build commandline.
User property is: android.ndk.build.ndk-toolchain.
objectsOutputDirectory File -

Folder containing native, static libraries compiled and linked by the NDK.


Default value is: ${project.build.directory}/obj.
User property is: android.ndk.objectsOutputDirectory.
skip boolean - Flag indicating whether or not the build should be skipped entirely
Default value is: false.
systemProperties Map - Defines additional system properties which should be exported to the ndk-build script. This
<systemProperties>
  <propertyName>propertyValue</propertyName>
  <build-target>android</build-target>
  [..]
</systemProperties>
*
target String -

Target to invoke on the native makefile.


User property is: android.ndk.target.
unpackedLibsFolder File - Folder in which AAR/APKLIB library dependencies will be unpacked.
Default value is: ${project.build.directory}/unpacked-libs.
User property is: unpackedLibsFolder.
useHeaderArchives Boolean - Flag indicating whether the header files for native, static library dependencies should be used. If true, the header archive for each statically linked dependency will be resolved.
Default value is: true.
User property is: android.ndk.build.use-header-archive.
useLocalSrcIncludePaths Boolean - Flag indicating whether the make files last LOCAL_SRC_INCLUDES should be used for determining what header files to include. Setting this flag to true, overrides any defined header files directives. Note: By setting this flag to true, all header files used in the project will be added to the resulting header archive. This may be undesirable in most cases and is therefore turned off by default.
Default value is: false.
User property is: android.ndk.useLocalSrcIncludePaths.

Parameter Details

additionalCommandline:

Specifies additional command line parameters to pass to ndk-build
  • Type: java.lang.String
  • Required: No
  • User Property: android.ndk.additionalCommandline

additionallyBuiltModules:

(no description)
  • Type: java.util.List
  • Required: No

allowMultiArtifacts:

Flag indicating whether or not multiple number of native libraries should be included
  • Type: boolean
  • Required: No
  • Default: false

applicationMakefile:

Specifies the application makefile to use for the build (if other than the default Application.mk).
  • Type: java.lang.String
  • Required: No
  • User Property: android.ndk.applicationMakefile

architectureToolchainMappings:

Defines the architecture to toolchain mappings for the NDK build <architectureToolchainMappings> <x86>x86-4.7</x86> <armeabi>arm-linux-androideabi-4.7</armeabi> </architectureToolchainMappings>
  • Type: com.simpligility.maven.plugins.androidndk.configuration.ArchitectureToolchainMappings
  • Required: No

architectures:

Defines the architectures for the NDK build - this is a space separated list (i.e x86 armeabi)
  • Type: java.lang.String
  • Required: No
  • User Property: android.ndk.architectures

attachHeaderFiles:

Flag indicating whether the header files used in the build should be included and attached to the build as an additional artifact.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.ndk.attachHeaderFiles
  • Default: true

attachLibrariesArtifacts:

Flag indicating whether the final artifacts should be included and attached to the build as an artifact.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.ndk.attachLibrariesArtifacts
  • Default: true

buildWarningsRegularExpression:

Defines the regular expression used to detect whether error/warning output from ndk-build is a minor compile warning or is actually an error which should cause the build to fail. If the pattern matches, the output from the compiler will not be considered an error and compile will be successful.
  • Type: java.lang.String
  • Required: No
  • User Property: android.ndk.buildWarningsRegularExpression
  • Default: .*[warning|note]: .*

classifier:

Specifies the classifier with which the artifact should be stored in the repository
  • Type: java.lang.String
  • Required: No
  • User Property: android.ndk.classifier

finalLibraryName:

Specifies the final name of the library output by the build (this allows the pom to override the default artifact name). The value should not include the 'lib' prefix or filename extension (e.g. '.so').
  • Type: java.lang.String
  • Required: No
  • User Property: android.ndk.finalLibraryName

headerFilesDirectives:

Specifies the set of header files includes/excludes which should be used for bundling the exported header files. The below shows an example of how this can be used.
<headerFilesDirectives>
  <headerFilesDirective>
    <directory>${basedir}/jni/include</directory>
    <includes>
      <includes>**\/*.h</include>
    </includes>
  <headerFilesDirective>
</headerFilesDirectives>

If no headerFilesDirectives is specified, the default includes will be defined as shown below:
<headerFilesDirectives>
  <headerFilesDirective>
    <directory>${basedir}/jni</directory>
    <includes>
      <includes>**\/*.h</include>
    </includes>
    <excludes>
      <exclude>**\/*.c</exclude>
    </excludes>
  <headerFilesDirective>
  [..]
</headerFilesDirectives>
  • Type: java.util.List
  • Required: No

ignoreBuildWarnings:

Flag indicating whether warnings should be ignored while compiling. If true, the build will not fail if warning are found during compile.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.ndk.ignoreBuildWarnings
  • Default: true

ignoreHeaderFilesArchives:

Specifies a set of group/artifact identifiers for which header archives should not be attempted to be resolved. This is useful when a static library dependcy on other static libraries but the headers of those libraries are not necessarily available. This allows the plugin to exclude the retrieval of those header archives
  <ignoreHeaderFilesArchives>
    <ignoreHeaderFilesArchive>
      <groupId>com.insidesecure.drm.agent.android</groupId>
      <artifactId>expat-static-lib</artifactId>
    </ignoreHeaderFilesArchive>
    <ignoreHeaderFilesArchive>
      <groupId>com.insidesecure.drm.agent.android</groupId>
      <artifactId>pcre-static-</artifactId>
    </ignoreHeaderFilesArchive>
  </ignoreHeaderFilesArchives>
  • Type: java.util.List
  • Required: No

leaveTemporaryBuildArtifacts:

Flag indicating whether temporary build artifacts are removed after a build
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.ndk.leaveTemporaryBuildArtifacts
  • Default: false

librariesOutputDirectory:

Folder containing native, static libraries compiled and linked by the NDK.

  • Type: java.io.File
  • Required: No
  • User Property: android.ndk.librariesOutputDirectory
  • Default: ${project.build.directory}/ndk-libs

makefile:

Specifies the makefile to use for the build (if other than the default Android.mk).
  • Type: java.lang.String
  • Required: No
  • User Property: android.ndk.makefile

maxJobs:

Flag indicating whether to use the max available jobs for the host machine
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.ndk.maxJobs
  • Default: false

ndkBuildExecutable:

Allows for overriding the default ndk-build executable.
  • Type: java.lang.String
  • Required: No
  • User Property: android.ndk.ndkBuildExecutable

ndkToolchain:

Specifies the NDK toolchain to use for the build. This will be using the NDK_TOOLCHAIN define on the ndk-build commandline.
  • Type: java.lang.String
  • Required: No
  • User Property: android.ndk.build.ndk-toolchain

objectsOutputDirectory:

Folder containing native, static libraries compiled and linked by the NDK.

  • Type: java.io.File
  • Required: No
  • User Property: android.ndk.objectsOutputDirectory
  • Default: ${project.build.directory}/obj

skip:

Flag indicating whether or not the build should be skipped entirely
  • Type: boolean
  • Required: No
  • Default: false

systemProperties:

Defines additional system properties which should be exported to the ndk-build script. This
<systemProperties>
  <propertyName>propertyValue</propertyName>
  <build-target>android</build-target>
  [..]
</systemProperties>
*
  • Type: java.util.Map
  • Required: No

target:

Target to invoke on the native makefile.

  • Type: java.lang.String
  • Required: No
  • User Property: android.ndk.target

unpackedLibsFolder:

Folder in which AAR/APKLIB library dependencies will be unpacked.
  • Type: java.io.File
  • Required: No
  • User Property: unpackedLibsFolder
  • Default: ${project.build.directory}/unpacked-libs

useHeaderArchives:

Flag indicating whether the header files for native, static library dependencies should be used. If true, the header archive for each statically linked dependency will be resolved.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.ndk.build.use-header-archive
  • Default: true

useLocalSrcIncludePaths:

Flag indicating whether the make files last LOCAL_SRC_INCLUDES should be used for determining what header files to include. Setting this flag to true, overrides any defined header files directives. Note: By setting this flag to true, all header files used in the project will be added to the resulting header archive. This may be undesirable in most cases and is therefore turned off by default.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.ndk.useLocalSrcIncludePaths
  • Default: false