ResourcesPackaging

Added in 8.0.0

interface ResourcesPackaging


Packaging options for java resource files in the Android DSL

android {
packaging {
resources {
excludes += "/..."
}
}
}

Summary

Public properties

MutableSet<String>

The set of excluded patterns.

MutableSet<String>

The set of patterns for which matching java resources are merged.

MutableSet<String>

The set of patterns for which the first occurrence is packaged in the APK.

Public properties

excludes

Added in 8.0.0
val excludesMutableSet<String>

The set of excluded patterns. Java resources matching any of these patterns do not get packaged in the APK.

Example: android.packagingOptions.resources.excludes += "**/*.exclude"

merges

Added in 8.0.0
val mergesMutableSet<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: android.packagingOptions.resources.merges += "**/*.merge"

pickFirsts

Added in 8.0.0
val pickFirstsMutableSet<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: android.packagingOptions.resources.pickFirsts += "**/*.pickFirst"