develocity-build-config-samples icon indicating copy to clipboard operation
develocity-build-config-samples copied to clipboard

Convention sample for single build Gradle plugin and Maven extension is added

Open erichaagdev opened this issue 7 months ago • 0 comments

This PR adds a working sample of a single build containing both a Convention Develocity Gradle plugin & Convention Develocity Maven extension, where common Develocity configuration is shared between the two.

The sample should feel very similar to the existing Convention Develocity Gradle plugin and Convention Develocity Maven extension that exist already in this repository.

The structure of the sample is as follows (also visible in the README of the sample):

  • convention-develocity-gradle-plugin - Contains the convention Gradle plugin
  • convention-develocity-maven-extension - Contains the convention Maven extension
  • convention-develocity-shared - Contains the convention logic shared between build tools
  • examples - Contains example builds that apply the convention Gradle plugin or Maven extension for different Gradle and Maven versions
    • gradle_5 - Applies the convention Gradle plugin on a Gradle 5 build
    • gradle_6 - Applies the convention Gradle plugin on a Gradle 6 build
    • gradle_6.9_and_later - Applies the convention Gradle plugin on a Gradle 6.9 and later build
    • maven_3 - Applies the convention Maven extension on a Maven 3 build

Testing

Just as was added for the other convention samples, a GitHub Actions workflow has been added that publishes the conventions locally and runs the example builds. The workflow tests both the Gradle and Maven conventions.

Deviations

Everything in this PR matches what was proposed in the specification, except for shadowing convention-develocity-shared in convention-develocity-gradle-plugin and convention-develocity-maven-extension. While possible, this added a lot of additional build logic that I felt detracted from the point of the sample. As this is only a sample, shadowing all components to a single jar can still be done if desired by the user (as could be done for the other samples too).

erichaagdev avatar Jul 29 '24 15:07 erichaagdev