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

Unify plugin-publish plugin with java-gradle-plugin #5808

Closed
oehme opened this issue Jun 28, 2018 · 3 comments
Closed

Unify plugin-publish plugin with java-gradle-plugin #5808

oehme opened this issue Jun 28, 2018 · 3 comments
Assignees
Labels
a:epic a:feature A new functionality in:publishing-plugins ivy-publish maven-publish
Milestone

Comments

@oehme
Copy link
Contributor

oehme commented Jun 28, 2018

From the Design Spec:

Context

Publishing Gradle plugins currently requires different plugins depending on whether one wants to publish to the Plugin Portal or a custom, e.g. company-internal, repository. For the former purpose, there’s the Plugin Publishing Plugin (com.gradle.plugin-publish); for the latter, there’s the Gradle Plugin Development Plugin (java-gradle-plugin).

When a project wants to publish Gradle plugins to both the Plugin Portal and a custom Maven repository or simply use the Gradle Plugin Development Plugin to generate the plugin descriptors, its build script currently requires some duplication:

  • the plugin IDs have to be duplicated in the plugins blocks of gradlePlugin and pluginBundle
  • the maven coordinates have to customized twice (in mavenCoordinates of pluginBundle and in the pluginMaven publication).

Moreover, the Plugin Publishing Plugin generates a separate POM file and does not take into account any customizations made to the POM of the main publication added by the Gradle Plugin Development Plugin.

Goal

Simplify publishing to the Plugin Portal and a custom repository to avoid duplication and enable reuse of POM customization.

@oehme oehme added a:feature A new functionality from:member in:publishing-plugins ivy-publish maven-publish labels Jun 28, 2018
@marcphilipp
Copy link
Contributor

marcphilipp commented Jul 3, 2018

I wrote a design spec and updated the issue description with its main points. Comments on the design spec are welcome!

@marcphilipp marcphilipp added this to the 4.10 RC1 milestone Jul 24, 2018
@marcphilipp
Copy link
Contributor

plugin-publish 0.10.0 has been released, the changes to the java-gradle-plugin plugin will be in 4.10.

@jmini
Copy link

jmini commented Sep 5, 2019

If anyone is interested, @marcphilipp wrote this little example to demonstrate how to use this feature with the Groovy DSL:
https://github.com/marcphilipp/gradle-sandbox/blob/85e934d13b413df2fccd752591f631128e7e7734/plugin-maven-publish/build.gradle#L23-L44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:epic a:feature A new functionality in:publishing-plugins ivy-publish maven-publish
Projects
None yet
Development

No branches or pull requests

3 participants