Avoid calling getProject() during BootBuildImage's execution

See gh-22922
pull/23886/head
Andy Wilkinson 4 years ago
parent 72361a7521
commit 4a4fec6310

@ -90,7 +90,8 @@ public class BootBuildImage extends DefaultTask {
this.targetJavaVersion = getProject().getObjects().property(JavaVersion.class);
this.projectName = getProject().getName();
this.projectVersion = getProject().getObjects().property(String.class);
this.projectVersion.set(getProject().provider(() -> getProject().getVersion().toString()));
Project project = getProject();
this.projectVersion.set(getProject().provider(() -> project.getVersion().toString()));
}
/**

Loading…
Cancel
Save