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
ConstructorsConstructorDescriptionAutomaticDependency(String configuration, String coordinates, Optional<ConfigurableVersionProperty> versionProperty) Creates an instance of aAutomaticDependencyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(org.gradle.api.Project p) Returns the value of theconfigurationrecord component.Returns the value of thecoordinatesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Returns the value of theversionPropertyrecord component.withConfiguration(String configuration)
-
Constructor Details
-
AutomaticDependency
public AutomaticDependency(String configuration, String coordinates, Optional<ConfigurableVersionProperty> versionProperty) Creates an instance of aAutomaticDependencyrecord class.- Parameters:
configuration- the value for theconfigurationrecord componentcoordinates- the value for thecoordinatesrecord componentversionProperty- the value for theversionPropertyrecord 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 theconfigurationrecord component.- Returns:
- the value of the
configurationrecord component
-
coordinates
Returns the value of thecoordinatesrecord component.- Returns:
- the value of the
coordinatesrecord component
-
versionProperty
Returns the value of theversionPropertyrecord component.- Returns:
- the value of the
versionPropertyrecord component
-