Implementation for provided and optional

* Introduces a `provided` configuration.
* Introduces an `optional` attribute.
* Handles configurations for publishing to Ivy and Maven repos.
* Added unit/integration tests.

This should probably become a "regular" Gradle plugin. At the moment there's no direct dependency on another Nebula plugin.
Any ideas how to avoid that exception?
On Jul 15, 2014 2:03 PM, "Benjamin Muschko" <notifications@github.com>
wrote:

> In
> src/main/groovy/nebula/plugin/extraconfigurations/OptionalBasePlugin.groovy:
>
> > +        project.ext.optionalDeps = []
> > +
> > +        project.ext.optional = { dep ->
> > +            project.ext.optionalDeps << dep
> > +        }
> > +    }
> > +
> > +    /**
> > +     * Configures Maven Publishing plugin to ensure that published dependencies receive the optional element.
> > +     *
> > +     * @param project Project
> > +     */
> > +    private void configureMavenPublishPlugin(Project project) {
> > +        PublishingConfigurer mavenPublishingConfigurer = new MavenPublishingConfigurer(project)
> > +
> > +        mavenPublishingConfigurer.withPublication { MavenPom pom ->
>
> Changed the code to reuse some of your logic from the publishing plugin to
> avoid this exception to be thrown:
>
> Cannot configure the 'publishing' extension after it has been accessed.
>
> Validated by applying the plugin in the Nebula project, declaring a
> provided and optional dependency and running build.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nebula-plugins/nebula-extra-configurations-plugin/pull/3/files#r14963100>
> .
>