Stay organized with collections
Save and categorize content based on your preferences.
JniLibsPackagingOptions
@Incubating interface JniLibsPackagingOptions
Defines a variant's packaging options for native library (.so) files.
Summary
Properties
|
abstract SetProperty<String> |
The set of excluded patterns.
|
abstract SetProperty<String> |
The set of patterns for native libraries that should not be stripped of debug symbols.
|
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. Native libraries matching any of these patterns do not get
packaged.
Example usage: packagingOptions.jniLibs.excludes.add("**
/exclude.so")
keepDebugSymbols
abstract val keepDebugSymbols: SetProperty<String>
The set of patterns for native libraries that should not be stripped of debug symbols.
Example: packagingOptions.jniLibs.keepDebugSymbols.add("**
/doNotStrip.so")
pickFirsts
abstract val pickFirsts: SetProperty<String>
The set of patterns for which the first occurrence is packaged in the APK. For each native
library APK entry path matching one of these patterns, only the first native library found
with that path gets packaged.
Example usage: packagingOptions.jniLibs.pickFirsts.add("**
/pickFirst.so")
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,["# JniLibsPackagingOptions\n=======================\n\n```\n@Incubating interface JniLibsPackagingOptions\n```\n\n|------------------------------------------------------------|\n| [com.android.build.api.variant.JniLibsPackagingOptions](#) |\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [JniLibsApkPackagingOptions](/reference/tools/gradle-api/4.2/com/android/build/api/variant/JniLibsApkPackagingOptions) |------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------| | [JniLibsApkPackagingOptions](/reference/tools/gradle-api/4.2/com/android/build/api/variant/JniLibsApkPackagingOptions) | Defines an APK variant's packaging options for native library (. | |\n\nDefines a variant's packaging options for native library (.so) files.\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 | [keepDebugSymbols](#keepDebugSymbols:org.gradle.api.provider.SetProperty) The set of patterns for native libraries that should not be stripped of debug symbols. |\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. Native libraries matching any of these patterns do not get\npackaged.\n\nExample usage: `packagingOptions.jniLibs.excludes.add(\"**`/`exclude.so\")` \n\n### keepDebugSymbols\n\n```\nabstract val keepDebugSymbols: SetProperty\u003cString\u003e\n```\n\nThe set of patterns for native libraries that should not be stripped of debug symbols.\n\nExample: `packagingOptions.jniLibs.keepDebugSymbols.add(\"**`/`doNotStrip.so\")` \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 native\nlibrary APK entry path matching one of these patterns, only the first native library found\nwith that path gets packaged.\n\nExample usage: `packagingOptions.jniLibs.pickFirsts.add(\"**`/`pickFirst.so\")`"]]