@groovy.transform.CompileStatic abstract class GrailsCliArtifactGradlePlugin extends java.lang.Object implements Plugin<Project>
Configures a Grails plugin project to ship its CLI commands as a companion artifact under its
own Maven coordinate (<artifactId>-cli), keeping command code and CLI-only dependencies
off the runtime classpath of consuming applications.
Applying the plugin:
cli source set (src/cli/groovy) exposed as a feature variant;org.apache.grails:grails-core-cli (the command contract) and the plugin's own
runtime classes to the cli compile classpath, so commands compile with no additional
configuration and are registered automatically in META-INF/grails-cli.factories;cli software component;Grails-Cli-Artifact manifest attribute, so the
Grails Gradle plugin adds the companion to a consuming application's grailsCli
configuration automatically;org.apache.grails.gradle.grails-publish) when it is applied.cliArtifact extension:
cliArtifact {
automaticModuleName = 'com.example.myplugin.cli'
}
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
CLI_ARTIFACT_MANIFEST_ATTRIBUTE |
The runtime-jar manifest attribute advertising the companion cli coordinate |
static java.lang.String |
CLI_COMPONENT_NAME |
|
static java.lang.String |
CLI_PUBLICATION_NAME |
|
static java.lang.String |
CLI_SOURCE_SET_NAME |
| Constructor and description |
|---|
GrailsCliArtifactGradlePlugin() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
apply(Project project) |
|
abstract SoftwareComponentFactory |
getSoftwareComponentFactory() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
The runtime-jar manifest attribute advertising the companion cli coordinate