Stay organized with collections
Save and categorize content based on your preferences.
PrefabPackagingOptions
@Incubating interface PrefabPackagingOptions
Options for including Prefab packages in AARs.
Summary
Public properties |
Boolean |
True if the library is header only and contains no library files.
|
String? |
Path to a directory containing headers to export to dependents of this module.
|
String? |
The name of the library file, if it does not match the convention of lib.so or lib.a.
|
String |
The name of the library from the external native build to include in the AAR.
|
Public properties
var headerOnly: Boolean
True if the library is header only and contains no library files.
This value defaults to false.
var headers: String?
Path to a directory containing headers to export to dependents of this module.
Note that any file in this directory will be included.
If not set, no headers will be exported for this library.
libraryName
var libraryName: String?
The name of the library file, if it does not match the convention of lib.so or lib.a.
This option can be used to specify the name of the library file if it does not match the name of the library in the build system. For example, if a CMake target is named "mylib" but the name of the library file was overridden to "mylib.so" rather than the default of "libmylib.so" using OUTPUT_NAME, libraryName should be set to "mylib".
If this option is null, the default convention of lib will be used.
name
var name: String
The name of the library from the external native build to include in the AAR.
The name of the library must match the name of the library used by the external native build. For an ndk-build project, this is the LOCAL_MODULE option. For a CMake project, this is the name of the target.
This name will be the name of the module in the prefab package, and the package name will be the name of the gradle project.
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,["# PrefabPackagingOptions\n======================\n\n\n```\n@Incubating interface PrefabPackagingOptions\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nOptions for including [Prefab](https://google.github.io/prefab/) packages in AARs.\n\nSummary\n-------\n\n| ### Public properties ||\n|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [headerOnly](/reference/tools/gradle-api/7.4/com/android/build/api/dsl/PrefabPackagingOptions#headerOnly()) True if the library is header only and contains no library files. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | [headers](/reference/tools/gradle-api/7.4/com/android/build/api/dsl/PrefabPackagingOptions#headers()) Path to a directory containing headers to export to dependents of this module. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | [libraryName](/reference/tools/gradle-api/7.4/com/android/build/api/dsl/PrefabPackagingOptions#libraryName()) The name of the library file, if it does not match the convention of lib.so or lib.a. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [name](/reference/tools/gradle-api/7.4/com/android/build/api/dsl/PrefabPackagingOptions#name()) The name of the library from the external native build to include in the AAR. |\n\nPublic properties\n-----------------\n\n### headerOnly\n\n```\nvar headerOnly: Boolean\n```\n\nTrue if the library is header only and contains no library files.\n\nThis value defaults to false. \n\n### headers\n\n```\nvar headers: String?\n```\n\nPath to a directory containing headers to export to dependents of this module.\n\nNote that any file in this directory will be included.\n\nIf not set, no headers will be exported for this library. \n\n### libraryName\n\n```\nvar libraryName: String?\n```\n\nThe name of the library file, if it does not match the convention of lib.so or lib.a.\n\nThis option can be used to specify the name of the library file if it does not match the name of the library in the build system. For example, if a CMake target is named \"mylib\" but the name of the library file was overridden to \"mylib.so\" rather than the default of \"libmylib.so\" using OUTPUT_NAME, libraryName should be set to \"mylib\".\n\nIf this option is null, the default convention of lib will be used. \n\n### name\n\n```\nvar name: String\n```\n\nThe name of the library from the external native build to include in the AAR.\n\nThe name of the library must match the name of the library used by the external native build. For an ndk-build project, this is the LOCAL_MODULE option. For a CMake project, this is the name of the target.\n\nThis name will be the name of the module in the prefab package, and the package name will be the name of the gradle project."]]