BasePlugin adds every published artifact to the archives configuration


(detelinyordanov) #1

Hi guys,

I’m trying to migrate our existing Gradle build which initially used Gradle 1.0-m3 to Gradle 1.0-m5, but I noticed something unusual in the handling of published artifacts - it seems that now every published artifact is also added to the archives configuration.

Our build was configured to expect only production artifacts in the archives configuration, while we also added separate ‘sources’, ‘docs’ and ‘tests’ configurations to hold the source, javadoc and integration test archives respectively. With Gradle 1.0-m5 those artifacts also appear in the archives configuration and are delivered as part of the product.

What is the reason for this behavior and is there a way to switch it off? Does this mean that to migrate to 1.0-m5 we need to have a separate configuration in addition to the archives configuration, which would serve as a container for production binaries instead?

Thanks,

Detelin


(andrew.oberstar) #2

I believe the new appraoach is that all artifacts are in archives, but the binaries are in runtime.

Migration Guide


(detelinyordanov) #3

Thanks a lot,

Sorry for not reading the migration guide carefully, I missed that one probably because most of the things mentioned there did not concern me so I overlooked this one also. So I will be converting our build infrastructure to collect production artifacts from the ‘runtime’ configuration instead.

Cheers,

Detelin


(Tom) #4

This breaking change seems to be fine when dealing with Java applications. However in case of web applications, when applying the Gradle war plugin, what is the expected behavior?

(1) The War Plugin documentation (chapter 23) states that the “runtime” configuration extends the “compile” configuration

(2) In reality I believe the “runtime” configuration is equal “compile+providedRuntime”

Now, shouldn’t (2) be changed to match the documentation (1)?

I would rather expect that the “runtime” configuration contains only the Web applications partition of the “classpath”, not the overall “classpath” including the part provided by the container.