Hello,
We are trying to move from Gradle 7.5 to 8.0.
We are having problems with a plugin when we try to recover several extension properties.
In our build.gradle file, we have an structure like:
Object1 {
propertie1 "value1"
object2 {
propertie2 "value2"
propertie3 "value3"
propertie4 "value4"
}
}
In the plugin code, we are doing:
public void apply(Project project) {
NamedDomainObjectContainer<DocumentResource> resources = project.container(DocumentResource.class);
Object1 extension = project.getExtensions().create("Object1", Object1.class, project, resources);
project.afterEvaluate(action -> {
System.out.println(extension.getPropertie1());
System.out.println(extension.getobject2());
With Gradle 7.5 the code works ok and both values are present, but with 8.0 version, second value is null; even more, if we modify the the order in build.gradle file, defining the object2 before propertie1, in 8.0 version both values are null.
Any idea about how to solve it?