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?

cheers!
René
--
Principal Engineer,
Gradleware Inc. - Gradle Training, Support, Consulting
[email protected]
http://gradleware.c







---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to