saker.android Documentation TaskDoc JavaDoc Packages
Performs Android resource compilation using the aapt2 tool from the Android SDK. The task will compile the given resources which can then be linked together using the saker.android.aapt2.link() task. The task can be used to compile the resources from AAR library dependencies as well.
Summary
Parameters
IdentifierSpecifies an identifier for the compilation operation.
Input
Required parameter.
The input resources for the aapt2 compilation.
LegacyTreats errors that are permissible when using earlier versions of AAPT as warnings.
NoCrunchDisables PNG processing.
PseudoLocalizeGenerates pseudo-localized versions of default strings, such as en-XA and en-XB.
SDKsSpecifies the SDKs (Software Development Kits) used by the task.
VerboseEnable verbose logging.
Parameters
Specifies an identifier for the compilation operation. The identifier will be used to uniquely identify this operation, and to generate the output directory name.
Required parameter.
The input resources for the aapt2 compilation. The input can be one or multiple paths to Android resource directories, AAR bundles, resolved Maven AAR artifacts.
Treats errors that are permissible when using earlier versions of AAPT as warnings. Corresponds to the --legacy flag of aapt2.
Disables PNG processing. Use this option if you have already processed the PNG files, or if you are creating debug builds that do not require file size reduction. Enabling this option results in a faster execution, but increases the output file size. Corresponds to the --no-crunch flag of aapt2.
Generates pseudo-localized versions of default strings, such as en-XA and en-XB. Corresponds to the --pseudo-localize flag of aapt2.
Specifies the SDKs (Software Development Kits) used by the task. SDKs represent development kits that are available in the build environment and to the task. They are used to find the necessary tools to perform the necessary operations. You should specify the AndroidBuildTools and AndroidPlatform SDKs so the build tasks can find the relevant tools to perform their operations. If you don't specify these SDKs, then the build tasks will attempt to locate them automatically. If they fail to do so, an exception is thrown. You can use the saker.android.sdk.buildtools() and saker.android.sdk.platform() tasks to retrieve SDKs with specific versions. The SDK names are compared in a case-insensitive way.
Enable verbose logging. Corresponds to the -v flag of aapt2.