Packaging

Added in 8.0.0

interface Packaging


Packaging option entry point for the Android DSL.

android {
packaging {
}
}

Summary

Public functions

Unit
dex(action: DexPackaging.() -> Unit)

Method to configure the packaging options for dex files via a lambda

Unit
doNotStrip(pattern: String)

This function is deprecated. This method is deprecated.

Unit
exclude(pattern: String)

This function is deprecated. This method is deprecated.

Unit
jniLibs(action: JniLibsPackaging.() -> Unit)

Method to configure the packaging options for JNI library files via a lambda

Unit
merge(pattern: String)

This function is deprecated. This method is deprecated.

Unit
pickFirst(pattern: String)

This function is deprecated. This method is deprecated.

Unit

Method to configure the packaging options for Java resources via a lambda

Public properties

DexPackaging

Packaging options for dex files

MutableSet<String>

This property is deprecated. This property is deprecated.

MutableSet<String>

This property is deprecated. This property is deprecated.

JniLibsPackaging

Packaging options for JNI library files

MutableSet<String>

This property is deprecated. This property is deprecated.

MutableSet<String>

This property is deprecated. This property is deprecated.

ResourcesPackaging

Packaging options for java resources

Public functions

dex

Added in 8.0.0
fun dex(action: DexPackaging.() -> Unit): Unit

Method to configure the packaging options for dex files via a lambda

android {
packaging {
dex {
useLegacyPackaging = false
}
}
}

doNotStrip

Added in 8.0.0
Deprecated in 8.0.0
fun doNotStrip(pattern: String): Unit

Adds a doNotStrip pattern.

Parameters
pattern: String

the pattern, as packaged in the APK

exclude

Added in 8.0.0
Deprecated in 8.0.0
fun exclude(pattern: String): Unit

Adds an excluded pattern.

Parameters
pattern: String

the pattern

jniLibs

Added in 8.0.0
fun jniLibs(action: JniLibsPackaging.() -> Unit): Unit

Method to configure the packaging options for JNI library files via a lambda

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

merge

Added in 8.0.0
Deprecated in 8.0.0
fun merge(pattern: String): Unit

Adds a merge pattern.

Parameters
pattern: String

the pattern, as packaged in the APK

pickFirst

Added in 8.0.0
Deprecated in 8.0.0
fun pickFirst(pattern: String): Unit

Adds a first-pick pattern.

Parameters
pattern: String

the path to add.

resources

Added in 8.0.0
fun resources(action: ResourcesPackaging.() -> Unit): Unit

Method to configure the packaging options for Java resources via a lambda

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

Public properties

dex

Added in 8.0.0
val dexDexPackaging

Packaging options for dex files

doNotStrip

Added in 8.0.0
Deprecated in 8.0.0
val doNotStripMutableSet<String>

The set of patterns for native library that should not be stripped of debug symbols.

excludes

Added in 8.0.0
Deprecated in 8.0.0
val excludesMutableSet<String>

The set of excluded paths.

jniLibs

Added in 8.0.0
val jniLibsJniLibsPackaging

Packaging options for JNI library files

merges

Added in 8.0.0
Deprecated in 8.0.0
val mergesMutableSet<String>

The set of patterns where all occurrences are concatenated and packaged in the APK.

pickFirsts

Added in 8.0.0
Deprecated in 8.0.0
val pickFirstsMutableSet<String>

The set of patterns where the first occurrence is packaged in the APK. First pick patterns do get packaged in the APK, but only the first occurrence found gets packaged.

resources

Added in 8.0.0
val resourcesResourcesPackaging

Packaging options for java resources