Class LibraryHandler
java.lang.Object
de.infolektuell.gradle.jextract.extensions.LibraryHandler
- All Implemented Interfaces:
org.gradle.api.Named
A configuration for a library to be generated by Jextract
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddependencies(org.gradle.api.Action<? super @NonNull JextractLibraryDependencies> action) Configurable dependencies blockabstract org.gradle.api.provider.ListProperty<@NonNull String> Macros to be defined, in the formatname=valueabstract JextractLibraryDependenciesConfigurable dependencies for this libraryThe name of the task that dumps the includes for this libraryThe name of the task that generates the bindings for this libraryabstract org.gradle.api.provider.Property<@NonNull Boolean> Generate source files instead of class files (Jextract 21 and below)abstract org.gradle.api.file.RegularFilePropertyThe header file to generate bindings forabstract org.gradle.api.provider.Property<@NonNull String> The name for the class generated from the header file, derived from the header file if missingabstract org.gradle.api.provider.ListProperty<@NonNull org.gradle.api.file.Directory> Additional directories where Jextract and Jmod should search for header filesabstract org.gradle.api.provider.ListProperty<@NonNull org.gradle.api.file.Directory> Directories containing legal notice documents, to be included in the JMOD archiveabstract org.gradle.api.provider.ListProperty<@NonNull String> Native libraries to be loaded by generated code (either names or paths starting with colon)abstract org.gradle.api.provider.ListProperty<@NonNull org.gradle.api.file.Directory> Additional directories where Jmod should search for native runtime binariesabstract org.gradle.api.file.DirectoryPropertyspecify the directory to place generated files.abstract org.gradle.api.provider.Property<@NonNull String> The package name for the generated codeabstract org.gradle.api.provider.Property<@NonNull Boolean> Load libraries in the library symbol lookup, using eitherSystem.loadorSystem.loadLibrary, useful for libraries in java.library.pathabstract WhitelistHandlerList of definitions to be includedfinal voidwhitelist(org.gradle.api.Action<? super @NonNull WhitelistHandler> action) Configurable block for the included definitionsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Named
getName
-
Constructor Details
-
LibraryHandler
public LibraryHandler()Used by Gradle
-
-
Method Details
-
getDependencies
Configurable dependencies for this library- Returns:
- A DSL object where dependencies can be added
-
dependencies
public void dependencies(org.gradle.api.Action<? super @NonNull JextractLibraryDependencies> action) Configurable dependencies block- Parameters:
action- The action to be applied to the dependencies object
-
getHeader
public abstract org.gradle.api.file.RegularFileProperty getHeader()The header file to generate bindings for- Returns:
- A property to configure the header file
-
getIncludes
public abstract org.gradle.api.provider.ListProperty<@NonNull org.gradle.api.file.Directory> getIncludes()Additional directories where Jextract and Jmod should search for header files- Returns:
- A property to add more include directories
-
getLibraryPath
public abstract org.gradle.api.provider.ListProperty<@NonNull org.gradle.api.file.Directory> getLibraryPath()Additional directories where Jmod should search for native runtime binaries- Returns:
- A property to add more library search directories
-
getLegalNotices
public abstract org.gradle.api.provider.ListProperty<@NonNull org.gradle.api.file.Directory> getLegalNotices()Directories containing legal notice documents, to be included in the JMOD archive- Returns:
- A property to add legal documents directories
-
getDefinedMacros
Macros to be defined, in the formatname=value- Returns:
- A property to add defined macros
-
getTargetPackage
The package name for the generated code- Returns:
- A property to configure the package name
-
getHeaderClassName
The name for the class generated from the header file, derived from the header file if missing- Returns:
- A property to configure the header class name
-
getWhitelist
List of definitions to be included- Returns:
- A list handler to configure the include definitions
-
whitelist
Configurable block for the included definitions- Parameters:
action- The configuration action to be applied to the white-list
-
getLibraries
Native libraries to be loaded by generated code (either names or paths starting with colon)- Returns:
- A property to add library names
-
getUseSystemLoadLibrary
Load libraries in the library symbol lookup, using eitherSystem.loadorSystem.loadLibrary, useful for libraries in java.library.path- Returns:
- A boolean property
-
getOutput
public abstract org.gradle.api.file.DirectoryProperty getOutput()specify the directory to place generated files.- Returns:
- a property to configure the output directory
-
getGenerateSourceFiles
Generate source files instead of class files (Jextract 21 and below)- Returns:
- a boolean property
-
getGenerateBindingsTaskName
The name of the task that generates the bindings for this library- Returns:
- The task name
-
getDumpIncludesTaskName
The name of the task that dumps the includes for this library- Returns:
- The task name
-