Class JextractGenerateTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
de.infolektuell.gradle.jextract.tasks.JextractBaseTask
de.infolektuell.gradle.jextract.tasks.JextractGenerateTask
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.Named, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>
Task that uses Jextract to generate Java bindings for given C headers
-
Nested Class Summary
Nested classes/interfaces inherited from class JextractBaseTask
JextractBaseTask.JextractInstallation, JextractBaseTask.LocalJextractInstallation, JextractBaseTask.RemoteJextractInstallationNested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Field Summary
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidTask action that uses Jextract to generate Java bindingsabstract org.gradle.api.file.RegularFilePropertyAn optional arg file for includes filteringabstract org.gradle.api.file.DirectoryPropertyThe directory where to place generated compiled class filesabstract org.gradle.api.provider.ListProperty<@NonNull String> All macros defined for this library, conforming to thename=valuepattern ornamewherevaluewill be 1protected abstract org.gradle.api.file.FileSystemOperationsInject the build service for file system operations.abstract org.gradle.api.provider.Property<@NonNull Boolean> Generate source files instead of class files (Jextract 21 and below)abstract org.gradle.api.provider.Property<@NonNull String> Name of the generated header class (derived from header file name if missing)abstract 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.file.DirectoryPropertyThe directory where to place the generated source filesabstract org.gradle.api.provider.Property<@NonNull String> The package name for the generated classes (unnamedif missing).abstract org.gradle.api.provider.Property<@NonNull Boolean> Load libraries in the library symbol lookup, using eitherSystem.loadorSystem.loadLibrary, useful for libraries in java.library.pathAll symbols to be included in the generated bindings, grouped by their category The key of each entry denotes a category, the value is a list of symbols.Methods inherited from class JextractBaseTask
getHeader, getIncludes, getInstallation, getJextractStoreMethods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Constructor Details
-
JextractGenerateTask
public JextractGenerateTask()Used by Gradle
-
-
Method Details
-
getDefinedMacros
All macros defined for this library, conforming to thename=valuepattern ornamewherevaluewill be 1- Returns:
- A list property to add defined macros
-
getTargetPackage
@Optional @Input public abstract org.gradle.api.provider.Property<@NonNull String> getTargetPackage()The package name for the generated classes (unnamedif missing).- Returns:
- A property to configure the package name
-
getHeaderClassName
@Optional @Input public abstract org.gradle.api.provider.Property<@NonNull String> getHeaderClassName()Name of the generated header class (derived from header file name if missing)- Returns:
- a property to configure the header name
-
getWhitelist
@Input public abstract org.gradle.api.provider.MapProperty<@NonNull String, @NonNull Set<String>> getWhitelist()All symbols to be included in the generated bindings, grouped by their category The key of each entry denotes a category, the value is a list of symbols.- Returns:
- A map property to add pairs of category and symbols
-
getArgFile
@Optional @InputFile @PathSensitive(RELATIVE) public abstract org.gradle.api.file.RegularFileProperty getArgFile()An optional arg file for includes filtering- Returns:
- a property to configure the file
-
getLibraries
Native libraries to be loaded by generated code (either names or paths starting with colon)- Returns:
- A property to add library names
-
getUseSystemLoadLibrary
@Optional @Input public abstract org.gradle.api.provider.Property<@NonNull Boolean> getUseSystemLoadLibrary()Load libraries in the library symbol lookup, using eitherSystem.loadorSystem.loadLibrary, useful for libraries in java.library.path- Returns:
- A boolean property
-
getGenerateSourceFiles
@Optional @Input public abstract org.gradle.api.provider.Property<@NonNull Boolean> getGenerateSourceFiles()Generate source files instead of class files (Jextract 21 and below)- Returns:
- a boolean property
-
getSources
@OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getSources()The directory where to place the generated source files- Returns:
- a directory property
-
getClasses
@OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getClasses()The directory where to place generated compiled class files- Returns:
- a directory property
-
generateBindings
protected final void generateBindings()Task action that uses Jextract to generate Java bindings -
getFileSystemOperations
@Inject protected abstract org.gradle.api.file.FileSystemOperations getFileSystemOperations()Inject the build service for file system operations.- Returns:
- The injected build service
-