While reviewing #30209, I noticed that bootWar
is configured eagerly. This is due to querying the extension of its artifact:
https://github.com/spring-projects/spring-boot/blob/43ba80d43171b751fd2acdcb70583a53ecfd6f31/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SinglePublishedArtifact.java#L42
currentArtifact
will be non-null as the artifact for bootJar
(created when the Java plugin is applied) will have already been added.