wooga / atlas-github

Gradle plugin to publish artifacts to github
https://wooga.github.io/atlas-github/
Apache License 2.0
1 stars 3 forks source link

Publishing plugin? #13

Open Vampire opened 6 years ago

Vampire commented 6 years ago

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

Larusso commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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