Package com.mooltiverse.oss.nyx.gradle
Class NyxExtension.CommitMessageConventions.CommitMessageConvention
- java.lang.Object
-
- com.mooltiverse.oss.nyx.gradle.NyxExtension.CommitMessageConventions.CommitMessageConvention
-
- Enclosing class:
- NyxExtension.CommitMessageConventions
public abstract static class NyxExtension.CommitMessageConventions.CommitMessageConvention extends Object
The class to model a single 'commitMessageConventions' item within the extension.
-
-
Constructor Summary
Constructors Constructor Description CommitMessageConvention(String name)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
bumpExpressions(Action<? super MapProperty<String,String>> configuration)
Accepts the DSL configuration for thebumpExpressions
block, needed for defining the block using the curly braces syntax in Gradle build scripts.MapProperty<String,String>
getBumpExpressions()
Returns the map of bump expression items.Property<String>
getExpression()
Returns the name of the version identifier to bump.String
getName()
Returns the name read-only mandatory property.protected abstract ObjectFactory
getObjectfactory()
Returns an object factory instance.
-
-
-
Constructor Detail
-
CommitMessageConvention
public CommitMessageConvention(String name)
Constructor. This constructor is required as per theNamedDomainObjectContainer
specification.- Parameters:
name
- the convention name
-
-
Method Detail
-
getObjectfactory
@Inject protected abstract ObjectFactory getObjectfactory()
Returns an object factory instance. The instance is injected by Gradle as soon as this getter method is invoked. Using property injection instead of constructor injection has a few advantages: it allows Gradle to refer injecting the object until it's required and is safer for backward compatibility (older versions can be supported).- Returns:
- the object factory instance
-
getName
public String getName()
Returns the name read-only mandatory property.- Returns:
- the name read-only mandatory property.
-
getExpression
public Property<String> getExpression()
Returns the name of the version identifier to bump. When this is set by the user it overrides the inference performed by Nyx. We provide an implementation of this method instead of using the abstract definition as it's safer for old Gradle versions we support.- Returns:
- the name of the version identifier to bump
-
getBumpExpressions
public MapProperty<String,String> getBumpExpressions()
Returns the map of bump expression items.- Returns:
- the map of bump expression items.
-
bumpExpressions
public void bumpExpressions(Action<? super MapProperty<String,String>> configuration)
Accepts the DSL configuration for thebumpExpressions
block, needed for defining the block using the curly braces syntax in Gradle build scripts. See the documentation on top of this class for more.- Parameters:
configuration
- the configuration object for thebumpExpressions
block
-
-