Record Class GradlePluginCoordinate

java.lang.Object
java.lang.Record
io.github.duckasteroid.agentdocs.resolve.task.model.GradlePluginCoordinate
Record Components:
pluginId - the plugin's id, e.g. io.github.duckasteroid.agent-docs.publish
All Implemented Interfaces:
SkillSource

public record GradlePluginCoordinate(String pluginId) extends Record implements SkillSource
Identifies a Gradle plugin applied via the plugins {} block, discovered by walking applied plugin classes and reading each one's jar via its classloader — there is no Maven GAV to key off, since plugin jars aren't resolved as normal project dependencies.
  • Constructor Details

    • GradlePluginCoordinate

      public GradlePluginCoordinate(String pluginId)
      Creates an instance of a GradlePluginCoordinate record class.
      Parameters:
      pluginId - the value for the pluginId record component
  • Method Details

    • describe

      public String describe()
      Human-readable identity for logging (a GAV string, or plugin:<id>).
      Specified by:
      describe in interface SkillSource
      Returns:
      display string
    • artifactNameKey

      public String artifactNameKey()
      Untruncated, normalized candidate skill name using only the last dot-separated segment of the plugin id (e.g. publish from io.github.duckasteroid.agent-docs.publish) — the shortest and most readable tier.
      Specified by:
      artifactNameKey in interface SkillSource
      Returns:
      normalized candidate key
    • groupArtifactNameKey

      public String groupArtifactNameKey()
      Untruncated, normalized candidate skill name using the full plugin id — the fallback tier when artifactNameKey() collides with another source in the same run. Since plugin ids are already globally unique, this tier is effectively unique on its own.
      Specified by:
      groupArtifactNameKey in interface SkillSource
      Returns:
      normalized candidate key
    • skillName

      public String skillName()
      Final, maximally-qualified skill name. Identical to groupArtifactNameKey() (there's no further-qualifying detail beyond the plugin id itself), finalized with the length-limit and hash-suffix rule.
      Specified by:
      skillName in interface SkillSource
      Returns:
      skill-folder-compatible name
    • finalizeSkillName

      public String finalizeSkillName(String normalizedKey)
      Applies the length-limit and deterministic hash-suffix rule to an already-normalized candidate key.
      Specified by:
      finalizeSkillName in interface SkillSource
      Parameters:
      normalizedKey - a normalized candidate key
      Returns:
      skill-folder-compatible name, truncated with a hash suffix if needed
    • 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.
    • pluginId

      public String pluginId()
      Returns the value of the pluginId record component.
      Returns:
      the value of the pluginId record component