Package io.micronaut.gradle.internal
Record Class AutomaticDependency
java.lang.Object
java.lang.Record
io.micronaut.gradle.internal.AutomaticDependency
- Record Components:
configuration
- the scope (aka configuration) to which the dependency needs to be appliedcoordinates
- the coordinates of the dependency in the "group:artifact" formversionProperty
- if present, the version property which can be used either in the DSL or gradle properties to override the default version
public record AutomaticDependency(String configuration, String coordinates, Optional<ConfigurableVersionProperty> versionProperty)
extends Record
Represents a dependency which is automatically
added by the Gradle plugin, such as some Micronaut
runtime dependencies or 3rd party dependencies.
-
Constructor Summary
ConstructorDescriptionAutomaticDependency
(String configuration, String coordinates, Optional<ConfigurableVersionProperty> versionProperty) Creates an instance of aAutomaticDependency
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyTo
(org.gradle.api.Project p) Returns the value of theconfiguration
record component.Returns the value of thecoordinates
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.Returns the value of theversionProperty
record component.withConfiguration
(String configuration)
-
Constructor Details
-
AutomaticDependency
public AutomaticDependency(String configuration, String coordinates, Optional<ConfigurableVersionProperty> versionProperty) Creates an instance of aAutomaticDependency
record class.- Parameters:
configuration
- the value for theconfiguration
record componentcoordinates
- the value for thecoordinates
record componentversionProperty
- the value for theversionProperty
record component
-
-
Method Details
-
applyTo
public void applyTo(org.gradle.api.Project p) -
withConfiguration
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
configuration
Returns the value of theconfiguration
record component.- Returns:
- the value of the
configuration
record component
-
coordinates
Returns the value of thecoordinates
record component.- Returns:
- the value of the
coordinates
record component
-
versionProperty
Returns the value of theversionProperty
record component.- Returns:
- the value of the
versionProperty
record component
-