Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
Adds a plugin that adds smithy files to an existing jar task.
The plugin requires that a plugin that creates a jar task be applied and adds the following when a prerequisite plugin has been added to the project:
smithyJarStaging
task that copies the smithy sources into the correct file structure for inclusion in a JARupdateJarManifest
action that is added with doFirst to the jar task. This will add smithy-specific build info to the jarsmithyJarValidate
task that will validate the smithy sources added to the JAR created by the jar taskNote: The integ tests will be moved over to this plugin and the smithy-base plugin in a separate PR.
Smithy Validate Task
The smithy validate task remains largely unchanged from the existing implementation. It is renamed from Validate for clarity and updated to use lazy configuration.
SmithyJarStaging task
This task copies files in the source plugin of a projection into the correct file structure for inclusion into a jar as resources.
The logic in the SmithyJarStaging used to be included in the SmithyBuildJar task, but has been broken out for clarity, and so users can stage multiple jars from the outputs of a single SmithyBuildTask. The staging task is disabled by default if the JAR task is disabled so that unnecessary copying is avoided.
Manifest Action
The SmithyManifestUpdateAction updates the Manifest of a JAR task to contain smithy-specific information. It is invoked by attaching to a task as follows:
jarTask.doFirst("updateJarManifest", new SmithyManifestUpdateAction(project, tagSet));
This will update the manifest of the jar created by the jarTask to include some build information as well as any specified smithy source stages.
An example Manifest is provided as follows (from the adds-tags example):
Previously the Manifest was updated via a task (SmithyTags).
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.