Class SmithyJarStagingTask
- 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>
sources plugin into the
correct file structure for inclusion in a JAR as resources.
The smithy source files and smithy manifest file are expected to exist at
META-INF/smithy/* within a JAR in order to be discoverable by the Smithy CLI.
The temporary staging directory created by this task is named staging-$TaskName
in order to ensure that multiple staging tasks can be run without naming collisions.
-
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
ConstructorsConstructorDescriptionSmithyJarStagingTask(org.gradle.api.file.FileSystemOperations fileSystemOperations, org.gradle.api.file.ProjectLayout projectLayout) -
Method Summary
Modifier and TypeMethodDescriptionvoidabstract org.gradle.api.file.DirectoryPropertyInput directory containing the smithy build artifacts to use for staging.abstract org.gradle.api.file.DirectoryPropertyOutput Directory of the task.abstract org.gradle.api.provider.Property<String>Projection to stage sources for.org.gradle.api.provider.Provider<File>Get the staged source directory.org.gradle.api.provider.Provider<File>Get the smithy staging directory path without the wrappingMETA-INFdirectory.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, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Constructor Details
-
SmithyJarStagingTask
@Inject public SmithyJarStagingTask(org.gradle.api.file.FileSystemOperations fileSystemOperations, org.gradle.api.file.ProjectLayout projectLayout)
-
-
Method Details
-
getInputDirectory
@InputDirectory @PathSensitive(RELATIVE) public abstract org.gradle.api.file.DirectoryProperty getInputDirectory()Input directory containing the smithy build artifacts to use for staging.This should almost always be the output directory of a
SmithyBuildTask. -
getProjection
Projection to stage sources for.Defaults to "source".
Note: The projection must exist in one of the smithy-build configs used to generate the input directory.
-
getOutputDir
@Internal public abstract org.gradle.api.file.DirectoryProperty getOutputDir()Output Directory of the task.Note: Marked as internal so that it is not checked for caching, although it can be used as an input property.
-
getSmithyStagingDir
Get the smithy staging directory path without the wrappingMETA-INFdirectory.This output should be used when including staging directory as a
metaInffile for a jar task. For example:tasks.register("MyJarTask") { // Include the staged files as a metaInf resource metaInf.from(stagingTask.smithyStagingDir.get()) // Other inputs for the jar task } -
getSmithyMetaInfDir
Get the staged source directory.This output should be used when including the staging directory in the resource sourceSet for a project.
-
copyModelsToStaging
public void copyModelsToStaging()
-