AaptOptions

DSL object for configuring aapt options.

Properties

PropertyDescription
additionalParameters

The list of additional parameters to pass to appt.

cruncherEnabled
Deprecated

Whether to crunch PNGs.

cruncherProcesses

Obtains the number of cruncher processes to use. More cruncher processes will crunch files faster, but will require more memory and CPU.

failOnMissingConfigEntry

Forces aapt to return an error if it fails to find an entry for a configuration.

ignoreAssets

Pattern describing assets to be ignore.

ignoreAssetsPattern

Pattern describing assets to be ignore.

noCompress

Extensions of files that will not be stored compressed in the APK. Adding an empty extension, i.e., setting noCompress '' will trivially disable compression for all files.

Methods

MethodDescription
additionalParameters(param)

Adds additional parameters to be passed to aapt.

additionalParameters(params)

Adds additional parameters to be passed to aapt.

noCompress(noCompress)

Sets extensions of files that will not be stored compressed in the APK.

noCompress(noCompress)

Sets extensions of files that will not be stored compressed in the APK.

Script blocks

No script blocks

Property details

List<String> additionalParameters

The list of additional parameters to pass to appt.

boolean cruncherEnabled

Note: This property is deprecated and will be removed in a future version of the plugin.

Whether to crunch PNGs.

This will reduce the size of the APK if PNGs resources are not already optimally compressed, at the cost of extra time to build.

PNG crunching is enabled by default in the release build type and disabled by default in the debug build type.

This is replaced by BuildType.isCrunchPngs().

int cruncherProcesses

Obtains the number of cruncher processes to use. More cruncher processes will crunch files faster, but will require more memory and CPU.

boolean failOnMissingConfigEntry

Forces aapt to return an error if it fails to find an entry for a configuration.

See aapt --help

String ignoreAssets

Pattern describing assets to be ignore.

See aapt --help

String ignoreAssetsPattern

Pattern describing assets to be ignore.

See aapt --help

Collection<String> noCompress

Extensions of files that will not be stored compressed in the APK. Adding an empty extension, i.e., setting noCompress '' will trivially disable compression for all files.

Equivalent of the -0 flag. See aapt --help

Method details

void additionalParameters(String param)

Adds additional parameters to be passed to aapt.

void additionalParameters(String... params)

Adds additional parameters to be passed to aapt.

void noCompress(String noCompress)

Sets extensions of files that will not be stored compressed in the APK.

Equivalent of the -0 flag. See aapt --help

void noCompress(String... noCompress)

Sets extensions of files that will not be stored compressed in the APK.

Equivalent of the -0 flag. See aapt --help