Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Aug 13, 2024

Conversation

erichaagdev
Copy link
Member

@erichaagdev erichaagdev commented Jul 29, 2024

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 erichaagdev self-assigned this Jul 29, 2024
@erichaagdev erichaagdev force-pushed the erichaagdev/convention-develocity-shared branch from d27b9e0 to f4e7a9c Compare July 29, 2024 15:44
@erichaagdev erichaagdev changed the title Single build Gradle plugin and Maven extension convention sample is added Convention sample for single build Gradle plugin and Maven extension is added Jul 29, 2024
@erichaagdev erichaagdev force-pushed the erichaagdev/convention-develocity-shared branch 16 times, most recently from d991382 to a3e275a Compare July 30, 2024 18:46
@erichaagdev erichaagdev marked this pull request as ready for review July 30, 2024 18:59
@erichaagdev erichaagdev requested review from etiennestuder, a team and clayburn July 30, 2024 19:07
Copy link
Member

@jprinet jprinet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job Eric, all clear!

I left a comment with a fancy idea to try to ease consumption of the lib. Not sure that would help a lot though.

@erichaagdev erichaagdev force-pushed the erichaagdev/convention-develocity-shared branch 2 times, most recently from 1da2910 to 74d54ff Compare August 2, 2024 18:10
Copy link
Contributor

github-actions bot commented Aug 2, 2024

Job Requested goals Build Tool Version Build Outcome Build Scan®
verification_maven-[object Object] clean verify 3.9.8 Build Scan PUBLISHED
Generated by gradle/develocity-actions

@erichaagdev erichaagdev force-pushed the erichaagdev/convention-develocity-shared branch from 407978a to 820acb5 Compare August 12, 2024 20:05
@erichaagdev erichaagdev force-pushed the erichaagdev/convention-develocity-shared branch from 820acb5 to f8468ff Compare August 12, 2024 20:10
@erichaagdev erichaagdev merged commit 73ceb4a into main Aug 13, 2024
42 checks passed
@erichaagdev erichaagdev deleted the erichaagdev/convention-develocity-shared branch August 13, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants