public interface FeatureSpec
Modifier and Type | Method | Description |
---|---|---|
void |
capability(java.lang.String group,
java.lang.String name,
java.lang.String version) |
Declares a capability of this feature.
|
void |
disablePublication() |
By default, features are published on external repositories.
|
void |
usingSourceSet(SourceSet sourceSet) |
Declares the source set which this feature is built from.
|
void |
withJavadocJar() |
Automatically package Javadoc and register the produced JAR as a variant.
|
void |
withSourcesJar() |
Automatically package sources from the linked
SourceSet and register the produced JAR as a variant. |
void usingSourceSet(SourceSet sourceSet)
sourceSet
- the source setvoid capability(java.lang.String group, java.lang.String name, java.lang.String version)
Calling this method multiple times will declare additional
capabilities. Note that calling this method will drop the default
capability that is added by
JavaPluginExtension.registerFeature(String, org.gradle.api.Action)
.
If you want to keep the default capability and add a new one you need to
restore the default capability:
registerFeature("myFeature") { capability("${project.group}", "${project.name}-my-feature", "${project.version}") capability("com.example", "some-other-capability", "2.0") }
group
- the group of the capabilityname
- the name of the capabilityversion
- the version of the capabilityvoid withJavadocJar()
JavaPluginExtension.withJavadocJar()
.void withSourcesJar()
SourceSet
and register the produced JAR as a variant.
See also JavaPluginExtension.withSourcesJar()
.@Incubating void disablePublication()