Prefab

public interface Prefab


Options for including Prefab packages in AARs.

Summary

Public methods

abstract boolean

True if the library is header only and contains no library files.

abstract String

Path to a directory containing headers to export to dependents of this module.

abstract String

The name of the library file, if it does not match the convention of lib.so or lib.a.

abstract @NonNull String

The name of the library from the external native build to include in the AAR.

abstract void
setHeaderOnly(boolean headerOnly)

True if the library is header only and contains no library files.

abstract void
setHeaders(String headers)

Path to a directory containing headers to export to dependents of this module.

abstract void
setLibraryName(String libraryName)

The name of the library file, if it does not match the convention of lib.so or lib.a.

abstract void

The name of the library from the external native build to include in the AAR.

Public methods

getHeaderOnly

abstract boolean getHeaderOnly()

True if the library is header only and contains no library files.

This value defaults to false.

getHeaders

abstract String getHeaders()

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.

getLibraryName

abstract String getLibraryName()

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.

getName

abstract @NonNull String getName()

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.

setHeaderOnly

abstract void setHeaderOnly(boolean headerOnly)

True if the library is header only and contains no library files.

This value defaults to false.

setHeaders

abstract void setHeaders(String headers)

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.

setLibraryName

abstract void setLibraryName(String libraryName)

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.

setName

abstract void setName(@NonNull String name)

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.