PluginContainer.withId

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

PluginContainer.withId

Szczepan Faber-2
Hey guys,

Are there any objections to adding PluginContainer.withId(String id) method?

Cheers!
--
Szczepan Faber
Principal engineer@gradle; Founder@mockito
Reply | Threaded
Open this post in threaded view
|

Re: PluginContainer.withId

Rene Groeschke
Can you explain a bit the usecase? why is PluginContainer.withType not enough?

cheers,
René


13 Mar 2014 15:15
Hey guys,

Are there any objections to adding PluginContainer.withId(String id) method?

Cheers!
--
Szczepan Faber
Principal engineer@gradle; Founder@mockito
Reply | Threaded
Open this post in threaded view
|

Re: PluginContainer.withId

Szczepan Faber-2
Hey,

- using withType requires me to know the fully qualified name of the class.
- using withType requires me to import the class (extra statement in the build script) or refer via fqn, both don't look good. It's not painful for built-in Gradle classes (because they are implicitly imported) but many times I need to work with my custom plugins or 3d party types.
- as a plugin author, I'd like the fqn of the plugin class to be 'internal' so that I can refactor it freely, rename, change packages at will.

Cheers!


On Thu, Mar 13, 2014 at 7:08 PM, Rene Groeschke <[hidden email]> wrote:
Can you explain a bit the usecase? why is PluginContainer.withType not enough?

cheers,
René


13 Mar 2014 15:15
Hey guys,

Are there any objections to adding PluginContainer.withId(String id) method?

Cheers!
--
Szczepan Faber
Principal engineer@gradle; Founder@mockito



--
Szczepan Faber
Principal engineer@gradle; Founder@mockito
Reply | Threaded
Open this post in threaded view
|

Re: PluginContainer.withId

Adam Murdoch
In reply to this post by Szczepan Faber-2

On 14 Mar 2014, at 1:15 am, Szczepan Faber <[hidden email]> wrote:

Hey guys,

Are there any objections to adding PluginContainer.withId(String id) method?

You mean withId(String id, Action action)? Sounds fine to me.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com



Reply | Threaded
Open this post in threaded view
|

Re: PluginContainer.withId

Luke Daley-2


On 14 March 2014 at 6:38:45 am, Adam Murdoch ([hidden email]) wrote:

Hey guys,

Are there any objections to adding PluginContainer.withId(String id) method?

You mean withId(String id, Action action)? Sounds fine to me.

+1

Will this be all plugins applied? Or only plugins applied by id? What about plugins applied by class literal that have an id? 

There’s nothing to say that a class that implements Plugin has an id in our current model.
Reply | Threaded
Open this post in threaded view
|

Re: PluginContainer.withId

Adam Murdoch

On 14 Mar 2014, at 8:14 am, Luke Daley <[hidden email]> wrote:



On 14 March 2014 at 6:38:45 am, Adam Murdoch ([hidden email]) wrote:

Hey guys,

Are there any objections to adding PluginContainer.withId(String id) method?

You mean withId(String id, Action action)? Sounds fine to me.

+1

Will this be all plugins applied? Or only plugins applied by id? What about plugins applied by class literal that have an id? 

I think it should be based on something about the plugin (it has this id) rather than based on how the plugin was applied.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com



Reply | Threaded
Open this post in threaded view
|

Re: PluginContainer.withId

Szczepan Faber-2
You mean withId(String id, Action action)? Sounds fine to me.
yes 

I think it should be based on something about the plugin (it has this id) rather than based on how the plugin was applied.

+1
 
Cheers!
--
Szczepan Faber
Principal engineer@gradle; Founder@mockito