Class JmodCreateTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
de.infolektuell.gradle.jextract.tasks.JmodCreateTask
- 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>
@CacheableTask
public abstract class JmodCreateTask
extends org.gradle.api.DefaultTask
Creates a new JMOD archive.
-
Nested Class Summary
Nested 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 voidcreate()Task action that creates the JMOD archiveabstract org.gradle.api.file.ConfigurableFileCollectionApplication jar files|dir containing classes to be included in the JMOD.abstract org.gradle.api.provider.Property<@NonNull Integer> Compression to use when creating the JMOD archive.abstract org.gradle.api.provider.ListProperty<@NonNull String> Exclude files matching the supplied comma-separated pattern list.protected abstract org.gradle.process.ExecOperationsInject the build service for exec operationsabstract org.gradle.api.file.ConfigurableFileCollectionDirectories containing header files to be included in the jMOD archive.abstract org.gradle.api.file.RegularFilePropertygetJmod()The path where the JMOD archive will be created.abstract org.gradle.api.file.ConfigurableFileCollectionDirectories containing legal notice files to be included in the jMOD archive.abstract org.gradle.api.file.ConfigurableFileCollectiongetLibs()Directories containing native binaries to be included in the jMOD archive.abstract org.gradle.api.provider.Property<@NonNull String> The main class, if the JMOD is executable.abstract org.gradle.api.file.ConfigurableFileCollectionDirectories containing man pages to be included in the jMOD archive.abstract org.gradle.api.provider.Property<@NonNull org.gradle.jvm.toolchain.JavaInstallationMetadata> The toolchain where the JMOD executable is used from.abstract org.gradle.api.provider.Property<@NonNull String> The module version.abstract org.gradle.api.provider.Property<@NonNull String> The target platform.Methods 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
-
JmodCreateTask
public JmodCreateTask()Used by Gradle
-
-
Method Details
-
getMetadata
public abstract org.gradle.api.provider.Property<@NonNull org.gradle.jvm.toolchain.JavaInstallationMetadata> getMetadata()The toolchain where the JMOD executable is used from.- Returns:
- A property where the value can be configured.
-
getClasspath
@Classpath @InputFiles public abstract org.gradle.api.file.ConfigurableFileCollection getClasspath()Application jar files|dir containing classes to be included in the JMOD. This must be a module.- Returns:
- A file collection where the files can be added.
-
getCompress
Compression to use when creating the JMOD archive. Ranges from 0 to 9.- Returns:
- A property where the value can be configured.
-
getExcludes
@Optional @Input public abstract org.gradle.api.provider.ListProperty<@NonNull String> getExcludes()Exclude files matching the supplied comma-separated pattern list. See java.nio.file.FileSystem#getPathMatcher for possible pattern formats.- Returns:
- A list property where the patterns can be added.
-
getHeaderFiles
@InputFiles @PathSensitive(RELATIVE) public abstract org.gradle.api.file.ConfigurableFileCollection getHeaderFiles()Directories containing header files to be included in the jMOD archive.- Returns:
- A file collection to add the header files.
-
getLegalNotices
@InputFiles @PathSensitive(RELATIVE) public abstract org.gradle.api.file.ConfigurableFileCollection getLegalNotices()Directories containing legal notice files to be included in the jMOD archive.- Returns:
- A file collection to add the legal notices directories.
-
getLibs
@InputFiles @PathSensitive(RELATIVE) public abstract org.gradle.api.file.ConfigurableFileCollection getLibs()Directories containing native binaries to be included in the jMOD archive.- Returns:
- A file collection to add the binaries directories.
-
getManPages
@InputFiles @PathSensitive(RELATIVE) public abstract org.gradle.api.file.ConfigurableFileCollection getManPages()Directories containing man pages to be included in the jMOD archive.- Returns:
- A file collection to add the man page directories.
-
getMainClass
The main class, if the JMOD is executable.- Returns:
- A property to configure the fully qualified name of the main class.
-
getModuleVersion
@Optional @Input public abstract org.gradle.api.provider.Property<@NonNull String> getModuleVersion()The module version.- Returns:
- A property to configure the module version.
-
getTargetPlatform
@Optional @Input public abstract org.gradle.api.provider.Property<@NonNull String> getTargetPlatform()The target platform.- Returns:
- A property to configure the target platform.
-
getJmod
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getJmod()The path where the JMOD archive will be created.- Returns:
- A file property to configure the location of the JMOD archive.
-
create
protected void create()Task action that creates the JMOD archive -
getExecOperations
@Inject protected abstract org.gradle.process.ExecOperations getExecOperations()Inject the build service for exec operations- Returns:
- the injected build service
-