Stay organized with collections
Save and categorize content based on your preferences.
AndroidResources
interface AndroidResources
Defines a variant's aapt options.
Summary
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>
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
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/7.2/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/7.2/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/7.2/com/android/build/api/variant/AndroidResources#noCompress()) Extensions of files that will not be stored compressed 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\nExtensions 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.\n\nEquivalent of the -0 flag. See `aapt --help`"]]