Creates an Android APK based on the specified inputs.
The build task generates an APK that contains the spcified resources. The task doesn't performs ZIP alignment, and doesn't sign the created APK.
Summary
Assets | One or more paths to assets directories for the APK. |
Classes | Specifies the Java classes that should be part of the APK. |
CompressLibraries | Turns on the compression of shared libraries. |
Libraries | Specifies the libraries that should be added to the APK in the lib directory. |
Output | Specifies the name of the output APK. |
Resources | Required parameter. Specifies the resources to be included in the created APK.
|
Parameters
Collection of AssetsDirectoryPath
One or more paths to assets directories for the APK.
All files in each specified directory will be added to the assets/ directory in the output APK.
Specifies the Java classes that should be part of the APK.
The parameter accepts the output of the saker.android.d8() task.
Turns on the compression of shared libraries.
By default, the shared libraries (e.g. lib/*/libsomething.so) will be placed in the APK without compression. This is to allow page aligning them (by zipalign) and loading them using mmap.
Set this to true to enable compressing the shared libraries.
Aliases:
Libs
Lib
Specifies the libraries that should be added to the APK in the lib directory.
The parameter accepts a map with keys that correspond to the library name. The values are maps that contain the library ABI as keys and the location of the library to put in the APK.
Specifies the name of the output APK.
The specified path must be forward relative and will be used to place it in the build directory.
If not specified, default.apk is used.
Collection of ApkResourcesTaskOption
Aliases:
Required parameter.
Specifies the resources to be included in the created APK.
The parameter takes one or more resource APKs that are directly included in the output.
The parameter accepts the output of the saker.android.aapt2.link() task in which case all the linked resources will be part of the output. The task will also include the assets and JNI libraries from referenced AARs.