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

Replace Plugin-Local with Composite Build #231

Merged
merged 4 commits into from
Sep 4, 2024
Merged

Conversation

DanielJette
Copy link
Contributor

@DanielJette DanielJette commented Aug 6, 2024

What does this change accomplish?

Resolves #209

How have you achieved it?

Scope of Impact and Testing instructions

The samples and libraries should be unaffected from this change. API should be consistent with 3.1.0, but the local builds will now use Composite Builds instead of requiring a local copy of the plugin jar.

I have tested and published an alpha version of this to 3.2.0-alpha05

Notice

Warning

This change must keep main in a shippable state; it may be shipped without further notice.

@DanielJette DanielJette temporarily deployed to Central Repository Deployment August 6, 2024 01:53 — with GitHub Actions Inactive
@DanielJette
Copy link
Contributor Author

DanielJette commented Aug 6, 2024

The issue I keep running into is that composite builds appear to require the java-gradle-plugin plugin. However, this plugin manipulates the published artifacts in undesirable ways that I have not figured out how to control. It seems to duplicate and replace some of, but not all of, the publishing configuration we have set in publish.build.gradle

The trick is to set automatedPublishing = false which will prevent the creation of a duplicate/unnecessary publishing block.

@DanielJette DanielJette temporarily deployed to Central Repository Deployment September 1, 2024 13:43 — with GitHub Actions Inactive
@DanielJette DanielJette temporarily deployed to Central Repository Deployment September 1, 2024 13:51 — with GitHub Actions Inactive
@DanielJette DanielJette temporarily deployed to Central Repository Deployment September 1, 2024 16:26 — with GitHub Actions Inactive
@DanielJette DanielJette temporarily deployed to Central Repository Deployment September 1, 2024 17:56 — with GitHub Actions Inactive
@DanielJette DanielJette temporarily deployed to Central Repository Deployment September 2, 2024 00:23 — with GitHub Actions Inactive
@DanielJette DanielJette temporarily deployed to Central Repository Deployment September 2, 2024 00:40 — with GitHub Actions Inactive
@DanielJette DanielJette force-pushed the 209-composite_build-3 branch from 1c724a3 to 8bfd9c3 Compare September 2, 2024 23:38
@DanielJette DanielJette marked this pull request as ready for review September 2, 2024 23:41
@DanielJette DanielJette force-pushed the 209-composite_build-3 branch from 8bfd9c3 to d655231 Compare September 2, 2024 23:43
@DanielJette DanielJette requested review from jaredh and a team September 3, 2024 12:34
Copy link
Collaborator

@jaredh jaredh left a comment

Choose a reason for hiding this comment

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

Love seeing that JAR deleted finally. 😍


sourceCompatibility = JavaVersion.VERSION_17
gradlePlugin {
automatedPublishing = false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably a sign that we should move to letting the plugin generate the publications itself, but glad this is all it took.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely not. Never touching publishing again unless something is deprecated or broken 😆
I spent an embarrassing amount of time trying to get the built-in publishing to produce a properly signed plugin that was compatible with Maven Central. gradlePlugin is designed to publish to https://plugins.gradle.org/ and the Maven Central support is confusing and seemingly impossible to configure properly.

@DanielJette DanielJette merged commit 6698806 into main Sep 4, 2024
9 checks passed
@DanielJette DanielJette deleted the 209-composite_build-3 branch September 4, 2024 14:08
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.

Investigate removing Plugin-local.jar binary from samples
2 participants