Class ConventionalVersionPlugin

java.lang.Object
io.github.joke.conventionalversion.ConventionalVersionPlugin
All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.initialization.Settings>

public class ConventionalVersionPlugin extends Object implements org.gradle.api.Plugin<org.gradle.api.initialization.Settings>
Assigns every project in the build the version of the release-please package that claims it.

Calculates only. It never creates a tag, never writes a changelog and contributes no task: release-please remains the release authority and this predicts the number it will publish.

There is no configuration block. Every option that changes a number lives in release-please-config.json, under the name release-please gives it, so the two cannot disagree.

  • Field Details

  • Constructor Details

    • ConventionalVersionPlugin

      public ConventionalVersionPlugin()
  • Method Details

    • apply

      public void apply(org.gradle.api.initialization.Settings settings)
      Specified by:
      apply in interface org.gradle.api.Plugin<org.gradle.api.initialization.Settings>
    • assignVersions

      @VisibleForTesting protected void assignVersions(org.gradle.api.initialization.Settings settings)
      Resolves the catalogue once, then hands the plain value to every project.

      Resolved here rather than inside AssignVersion so git and the release configuration are read once for the whole build, and so the isolated action captures nothing but an immutable record.

    • calculate

      @VisibleForTesting protected VersionCatalogue calculate(org.gradle.api.initialization.Settings settings)