On 07/02/2013, at 8:59 AM, Sébastien Cogneau wrote: > Hi, > > I am currently working on this story > https://github.com/gradle/gradle/blob/master/design-docs/building-and-packaging-applications-and-libraries.md#allow-customisation-of-the-distribution-plugin > . I was about to make a pull request , should I wait for the right name for > 'baseName' before doing so ?
Just go ahead and make the pull request, I think. We can rename the property in a later change. > > Cheers, > Sébastien. > > 2013/2/6 Adam Murdoch <[email protected]> > > On 07/02/2013, at 4:08 AM, Rene Groeschke wrote: > >> Hey Devs, >> >> in our current implementation of the DistributionPlugin we can rename >> the name of a distribution: >> >> apply plugin:'distribution' >> >> distributions { >> custom{ >> name = 'someOtherName' >> } >> } >> >> The used Container here is DistributionContainer which extends >> NamedDomainObjectContainer<Distribution> where Distribution implements >> the "Named" interface. >> >> The problem here is, that we modify the name property whihch should be >> constant for the life of the object (quote from the Named javadoc) >> >> Let's say I want to modifiy some more properties of my custom >> distribution by adding this snippet later to build file: >> >> >> distributions { >> custom{ >> someOtherProp = 'someOtherValue' >> } >> } >> >> This now breaks the build as gradle tries to create a new Distribution >> instead of referencing the already created one because we changed the >> name which should be constant. >> >> I think we need to change the property to something like 'id' or >> 'distributionName' to avoid the problems we're just facing now. I favour >> 'id' as distributionName seems a bit redundant in this scope: >> >> distributions { >> custom{ >> distributionName = 'someDistributionName' >> } >> } >> >> thoughts? > > We should. It's planned for the next story. I called it 'baseName' in the > spec, but we could call it something else. > > > -- > Adam Murdoch > Gradle Co-founder > http://www.gradle.org > VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting > http://www.gradleware.com > > -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com
