Maven-publish plugin slows down configuration of multi-project build?

Recently, we replaced the “old” maven plugin by still incubating “maven-publish” in our builds. While having a look into our CI server, we realized that average build time was significantly higher after doing the migration. We had a look at gradle profile report since we are using --profile in CI.

As a result we realized that “Configuring Projects” increased dramatically right after adding

publishing {
    publications {
        mavenJava(MavenPublication) {

to java projects of our multi-project build (~100 projects).

Before doing the migration it looked like this:

Configuring Projects 13.231s

Afterwards we had results like this:

Configuring Projects 1m0.03s

As a result our builds are ~45s slower now. (Note: we are using gradle 1.9)

This is pretty interesting.

How big is the multi module project?

Well, it contains approx. 100 projects.

Thanks for the report.

This is something we hope to tackle soon.

Great, thx.

Do you already have an estimate about the version it will be handled in?

We don’t sorry.

in the meantime you could look into only applying the maven-publish plugin when you strictly need it by some conditional configuration.

Using configure on demand mode might be another option.