Stay organized with collections
Save and categorize content based on your preferences.
ResourcesPackagingOptions
@Incubating interface ResourcesPackagingOptions
Summary
Properties
|
abstract SetProperty<String> |
The set of excluded patterns.
|
abstract SetProperty<String> |
The set of patterns for which matching java resources are merged.
|
abstract SetProperty<String> |
The set of patterns for which the first occurrence is packaged in the APK.
|
Properties
excludes
abstract val excludes: SetProperty<String>
The set of excluded patterns. Java resources matching any of these patterns do not get
packaged in the APK.
Example usage: packagingOptions.resources.excludes.add("**
/*.exclude")
merges
abstract val merges: SetProperty<String>
The set of patterns for which matching java resources are merged. For each java resource
APK entry path matching one of these patterns, all java resources with that path are
concatenated and packaged as a single entry in the APK.
Example usage: packagingOptions.resources.merges.add("**
/*.merge")
pickFirsts
abstract val pickFirsts: SetProperty<String>
The set of patterns for which the first occurrence is packaged in the APK. For each java
resource APK entry path matching one of these patterns, only the first java resource found
with that path gets packaged in the APK.
Example usage: packagingOptions.resources.pickFirsts.add("**
/*.pickFirst")
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,["# ResourcesPackagingOptions\n=========================\n\n```\n@Incubating interface ResourcesPackagingOptions\n```\n\n|--------------------------------------------------------------|\n| [com.android.build.api.variant.ResourcesPackagingOptions](#) |\n\nSummary\n-------\n\n| ### Properties ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [SetProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/SetProperty.html)\\\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\\\u003e | [excludes](#excludes:org.gradle.api.provider.SetProperty) The set of excluded patterns. |\n| abstract [SetProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/SetProperty.html)\\\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\\\u003e | [merges](#merges:org.gradle.api.provider.SetProperty) The set of patterns for which matching java resources are merged. |\n| abstract [SetProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/SetProperty.html)\\\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\\\u003e | [pickFirsts](#pickFirsts:org.gradle.api.provider.SetProperty) The set of patterns for which the first occurrence is packaged in the APK. |\n\nProperties\n----------\n\n### excludes\n\n```\nabstract val excludes: SetProperty\u003cString\u003e\n```\n\nThe set of excluded patterns. Java resources matching any of these patterns do not get\npackaged in the APK.\n\nExample usage: `packagingOptions.resources.excludes.add(\"**`/`*.exclude\")` \n\n### merges\n\n```\nabstract val merges: SetProperty\u003cString\u003e\n```\n\nThe set of patterns for which matching java resources are merged. For each java resource\nAPK entry path matching one of these patterns, all java resources with that path are\nconcatenated and packaged as a single entry in the APK.\n\nExample usage: `packagingOptions.resources.merges.add(\"**`/`*.merge\")` \n\n### pickFirsts\n\n```\nabstract val pickFirsts: SetProperty\u003cString\u003e\n```\n\nThe set of patterns for which the first occurrence is packaged in the APK. For each java\nresource APK entry path matching one of these patterns, only the first java resource found\nwith that path gets packaged in the APK.\n\nExample usage: `packagingOptions.resources.pickFirsts.add(\"**`/`*.pickFirst\")`"]]