Stay organized with collections
Save and categorize content based on your preferences.
JniLibsPackaging
interface JniLibsPackaging
Defines a variant's packaging options for native library (.so) files.
Summary
Public properties |
SetProperty<String> |
The set of excluded patterns.
|
SetProperty<String> |
The set of patterns for native libraries that should not be stripped of debug symbols.
|
SetProperty<String> |
The set of patterns for which the first occurrence is packaged in the APK.
|
Public properties
excludes
val excludes: SetProperty<String>
The set of excluded patterns. Native libraries matching any of these patterns do not get packaged.
Example usage: packaging.jniLibs.excludes.add("**
/exclude.so")
keepDebugSymbols
val keepDebugSymbols: SetProperty<String>
The set of patterns for native libraries that should not be stripped of debug symbols.
Example: packaging.jniLibs.keepDebugSymbols.add("**
/doNotStrip.so")
pickFirsts
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: packaging.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,["# JniLibsPackaging\n================\n\n\n```\ninterface JniLibsPackaging\n```\n\n\u003cbr /\u003e\n\nKnown direct subclasses \n[JniLibsApkPackaging](/reference/tools/gradle-api/7.2/com/android/build/api/variant/JniLibsApkPackaging) \n\n|----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|\n| [JniLibsApkPackaging](/reference/tools/gradle-api/7.2/com/android/build/api/variant/JniLibsApkPackaging) | Defines an APK variant's packaging options for native library (.so) files. |\n\n*** ** * ** ***\n\nDefines a variant's packaging options for native library (.so) files.\n\nSummary\n-------\n\n| ### Public properties ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [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](/reference/tools/gradle-api/7.2/com/android/build/api/variant/JniLibsPackaging#excludes()) The set of excluded patterns. |\n| [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](/reference/tools/gradle-api/7.2/com/android/build/api/variant/JniLibsPackaging#keepDebugSymbols()) The set of patterns for native libraries that should not be stripped of debug symbols. |\n| [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](/reference/tools/gradle-api/7.2/com/android/build/api/variant/JniLibsPackaging#pickFirsts()) The set of patterns for which the first occurrence is packaged in the APK. |\n\nPublic properties\n-----------------\n\n### excludes\n\n```\nval excludes: SetProperty\u003cString\u003e\n```\n\nThe set of excluded patterns. Native libraries matching any of these patterns do not get packaged.\n\nExample usage: `packaging.jniLibs.excludes.add(\"**`/`exclude.so\")` \n\n### keepDebugSymbols\n\n```\nval keepDebugSymbols: SetProperty\u003cString\u003e\n```\n\nThe set of patterns for native libraries that should not be stripped of debug symbols.\n\nExample: `packaging.jniLibs.keepDebugSymbols.add(\"**`/`doNotStrip.so\")` \n\n### pickFirsts\n\n```\nval pickFirsts: SetProperty\u003cString\u003e\n```\n\nThe 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.\n\nExample usage: `packaging.jniLibs.pickFirsts.add(\"**`/`pickFirst.so\")`"]]