Class VersionReport
java.lang.Object
io.github.duckasteroid.gradle.versioning.releaseflow.VersionReport
Shared per-module version-analysis snapshot behind explainVersion/explainVersions - both tasks'
console output and their build/version-report.json file are built from exactly the same
VersionReport.Entry, so the two can never drift from each other, and buildEntry(java.lang.String, java.io.File, java.lang.String, java.lang.String, java.util.List<java.lang.String>, java.util.Map<io.github.duckasteroid.gradle.versioning.CommitAnalyzer.Bump, java.util.Set<java.lang.String>>, java.util.List<java.lang.String>, java.lang.String, java.lang.String) calls the
exact same VersionResolver methods tagReleaseCandidate(s) itself calls, so the preview
can never drift from what tagging would actually do either.
A plain class with no Gradle dependency, like VersionResolver/CommitAnalyzer/
ReleaseManifest - independently unit-testable against a real throwaway git repo.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOne commit's syntactic parse plus the bump it resolves to - seeCommitAnalyzer.static final classOne project's full version-analysis breakdown. -
Method Summary
Modifier and TypeMethodDescriptionstatic VersionReport.EntrybuildEntry(String module, File repoDir, String tagPrefix, String modulePath, List<String> fallbackPrefixes, Map<CommitAnalyzer.Bump, Set<String>> typeRules, List<String> excludedModulePaths, String forceVersion, String branchName) Builds one project'sVersionReport.Entryby calling the exact sameVersionResolvermethods tagReleaseCandidate(s) itself calls - see that task's doLast for the call sequence this mirrors.static StringtoJsonArray(List<VersionReport.Entry> entries) JSON array of entries, e.g.static voidwriteJsonArray(List<VersionReport.Entry> entries, File file) WritestoJsonArray(java.util.List<io.github.duckasteroid.gradle.versioning.releaseflow.VersionReport.Entry>)to file, creating parent directories as needed.
-
Method Details
-
buildEntry
public static VersionReport.Entry buildEntry(String module, File repoDir, String tagPrefix, String modulePath, List<String> fallbackPrefixes, Map<CommitAnalyzer.Bump, Set<String>> typeRules, List<String> excludedModulePaths, String forceVersion, String branchName) Builds one project'sVersionReport.Entryby calling the exact sameVersionResolvermethods tagReleaseCandidate(s) itself calls - see that task's doLast for the call sequence this mirrors. Never tags, pushes, or writes anything other than the returned Entry.- Parameters:
excludedModulePaths- seeVersionResolver.resolveBuildVersion- pass an empty list for a single-project computation (matching how the singular tagReleaseCandidate/ordinary-build version resolution never apply exclusions either), or the applying project's own exclusions (from releaseFlowTargets) for the multi-module aggregator.
-
toJsonArray
JSON array of entries, e.g. for explainVersions' build/version-report.json - "[]" when empty. -
writeJsonArray
WritestoJsonArray(java.util.List<io.github.duckasteroid.gradle.versioning.releaseflow.VersionReport.Entry>)to file, creating parent directories as needed.
-