WAR plugin configuration lifecycle regression in Gradle 3.0

issue-resolved
gradle-3522

#1

My build relies on having ‘runtime’ configuration unresolved before the execution phase. This is no longer the case in the 3.0. Is this a regression or breaking change in the War plugin?

apply plugin:'war'
defaultTasks 'build'
gradle.taskGraph.whenReady { taskGraph ->
    project.configurations.all {
        assert state == Configuration.State['UNRESOLVED']
    }
}

Running this build with no args:

* What went wrong:
Failed to notify task execution graph listener.
> assert state == Configuration.State['UNRESOLVED']
         |     |                     |
         |     false                 UNRESOLVED
         RESOLVED

(Mark Vieira) #2

Thanks for the report and reproducible case @cmcginty. I’ve confirmed this is a regression in 3.0 and have opened GRADLE-3522. I believe I have a fix for this and should have it done soon.


(Mark Vieira) #3

This has been fixed and will be included in Gradle 3.1.