Record Class ReleasePackage
java.lang.Object
java.lang.Record
io.github.joke.conventionalversion.config.ReleasePackage
- Record Components:
path- the package key,.for the repository rootcomponent- the component its tags carry, empty when it has noneexcludePaths- release-pleaseexclude-paths, subtrees this package does not claim
- All Implemented Interfaces:
Serializable
public record ReleasePackage(String path, String component, List<String> excludePaths, TagFormat tagFormat, VersionPolicy policy)
extends Record
implements Serializable
One releasable unit, as
release-please declares it.
The path is the key the manifest records a version under, and also the root of the paths this
package claims. A package with no component — which is what release-type: simple derives
when neither component nor package-name is set — is tagged by version alone.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReleasePackage(String path, String component, List<String> excludePaths, TagFormat tagFormat, VersionPolicy policy) Creates an instance of aReleasePackagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether a repository-relative path belongs to this package.Returns the value of thecomponentrecord component.intdepth()How specific this package's claim is, so the deepest declared package wins a contested path.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexcludePathsrecord component.final inthashCode()Returns a hash code value for this object.path()Returns the value of thepathrecord component.policy()Returns the value of thepolicyrecord component.tag(SemanticVersion version) Returns the value of thetagFormatrecord component.The tag this package renders for any version.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReleasePackage
public ReleasePackage(String path, String component, List<String> excludePaths, TagFormat tagFormat, VersionPolicy policy) Creates an instance of aReleasePackagerecord class.- Parameters:
path- the value for thepathrecord componentcomponent- the value for thecomponentrecord componentexcludePaths- the value for theexcludePathsrecord componenttagFormat- the value for thetagFormatrecord componentpolicy- the value for thepolicyrecord component
-
-
Method Details
-
tag
-
tagPattern
The tag this package renders for any version. Two packages sharing one are indistinguishable by tag, which is a configuration that cannot be resolved rather than one that resolves oddly. -
claims
Whether a repository-relative path belongs to this package. -
depth
public int depth()How specific this package's claim is, so the deepest declared package wins a contested path. -
toString
-
hashCode
-
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). -
path
-
component
-
excludePaths
Returns the value of theexcludePathsrecord component.- Returns:
- the value of the
excludePathsrecord component
-
tagFormat
Returns the value of thetagFormatrecord component.- Returns:
- the value of the
tagFormatrecord component
-
policy
Returns the value of thepolicyrecord component.- Returns:
- the value of the
policyrecord component
-