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 applied
coordinates - the coordinates of the dependency in the "group:artifact" form
versionProperty - 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 Details

  • Method Details

    • applyTo

      public void applyTo(org.gradle.api.Project p)
    • withConfiguration

      public AutomaticDependency withConfiguration(String configuration)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • configuration

      public String configuration()
      Returns the value of the configuration record component.
      Returns:
      the value of the configuration record component
    • coordinates

      public String coordinates()
      Returns the value of the coordinates record component.
      Returns:
      the value of the coordinates record component
    • versionProperty

      public Optional<ConfigurableVersionProperty> versionProperty()
      Returns the value of the versionProperty record component.
      Returns:
      the value of the versionProperty record component