Stay organized with collections
Save and categorize content based on your preferences.
AndroidResources
interface AndroidResources
Defines a variant's aapt options.
Summary
Public properties |
ListProperty<String> |
The list of additional parameters to pass to aapt.
|
ListProperty<String> |
The list of patterns describing assets to be ignored.
|
ListProperty<String> |
File extensions of Android resources, assets, and Java resources to be stored uncompressed in the APK.
|
Public properties
ignoreAssetsPatterns
val ignoreAssetsPatterns: ListProperty<String>
The list of patterns describing assets to be ignored.
See aapt's --ignore-assets flag via aapt --help
. Note: the --ignore-assets flag accepts a single string of colon-delimited patterns, whereas this property is a list of patterns.
This property will be initialized using the corresponding DSL value.
noCompress
val noCompress: ListProperty<String>
File extensions of Android resources, assets, and Java resources to be stored uncompressed in the APK. Adding an empty extension (e.g., noCompress.add("")
) will disable compression for all Android resources, assets, and Java resources.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# AndroidResources\n================\n\n\n```\ninterface AndroidResources\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDefines a variant's aapt options.\n\nSummary\n-------\n\n| ### Public properties ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ListProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ListProperty.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`\u003e` | [aaptAdditionalParameters](/reference/tools/gradle-api/8.0/com/android/build/api/variant/AndroidResources#aaptAdditionalParameters()) The list of additional parameters to pass to aapt. |\n| [ListProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ListProperty.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`\u003e` | [ignoreAssetsPatterns](/reference/tools/gradle-api/8.0/com/android/build/api/variant/AndroidResources#ignoreAssetsPatterns()) The list of patterns describing assets to be ignored. |\n| [ListProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ListProperty.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`\u003e` | [noCompress](/reference/tools/gradle-api/8.0/com/android/build/api/variant/AndroidResources#noCompress()) File extensions of Android resources, assets, and Java resources to be stored uncompressed in the APK. |\n\nPublic properties\n-----------------\n\n### aaptAdditionalParameters\n\n```\nval aaptAdditionalParameters: ListProperty\u003cString\u003e\n```\n\nThe list of additional parameters to pass to aapt.\n\nThis property will be initialized using the corresponding DSL value. \n\n### ignoreAssetsPatterns\n\n```\nval ignoreAssetsPatterns: ListProperty\u003cString\u003e\n```\n\nThe list of patterns describing assets to be ignored.\n\nSee aapt's --ignore-assets flag via `aapt --help`. Note: the --ignore-assets flag accepts a single string of colon-delimited patterns, whereas this property is a list of patterns.\n\nThis property will be initialized using the corresponding DSL value. \n\n### noCompress\n\n```\nval noCompress: ListProperty\u003cString\u003e\n```\n\nFile extensions of Android resources, assets, and Java resources to be stored uncompressed in the APK. Adding an empty extension (e.g., `noCompress.add(\"\")`) will disable compression for all Android resources, assets, and Java resources."]]