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

Publishing plugin? #13

Open
Vampire opened this issue May 3, 2018 · 7 comments
Open

Publishing plugin? #13

Vampire opened this issue May 3, 2018 · 7 comments

Comments

@Vampire
Copy link
Contributor

Vampire commented May 3, 2018

May I ask why you apply the publishing plugin in your plugin?
Its facilities are nowhere used, are they?

@Larusso
Copy link
Member

Larusso commented May 3, 2018

I just use it to get the publish life-cycle tasks. But thinking about it, it kinda makes sense to check if a publish task already exists.

@Vampire
Copy link
Contributor Author

Vampire commented May 3, 2018

As far as I remember there is a maybeCreate for tasks or so that creates if not available yet. But I'm not sure whether this works properly if one is applied first or the other.

@Larusso
Copy link
Member

Larusso commented May 3, 2018

Yeah the problems can arise when the publish plugin gets added after this plugin then. I would need to check how the gradle team creates the tasks. As far as I know they use a new temp task mechanic since gradle 4 for the lifecycle tasks.

@Vampire
Copy link
Contributor Author

Vampire commented May 3, 2018

If you don't want the publish lifecycle task, but only attach your task to it if it is applied (before or after) you could do it with reactive coding like project.pluginMangager.withPlugin('publishing') { ... }.
If you want to always have their lifecyle task to attach to, it is maybe ok to apply the plugin.
As I said, I just skimmed over and wondered. :-)

@Vampire
Copy link
Contributor Author

Vampire commented May 3, 2018

One could also imagine that a Gradle plugin can add a repository type for the publishing plugin, so that the full facilities of the publishing plugin are used and not just the lifecycle tasks. :-)

@Larusso
Copy link
Member

Larusso commented May 3, 2018

Yeah I did this in my other plugin https://github.com/wooga/atlas-paket. I tried with this plugin to have a as much gradle-lishous experience as possible without moving the whole world to get it to work :) The gradle guys don't make it easy sometimes.

@Vampire
Copy link
Contributor Author

Vampire commented May 3, 2018

Complain to them, so they can make it easier. :-)

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

No branches or pull requests

2 participants