Object (@NotNull IncludedBuild includedBuild) { Class<?> includedBuildInternalClass = GradleReflectionUtil.findClassForName("org.gradle.internal.composite.IncludedBuildInternal"); if (includedBuildInternalClass != null && includedBuildInternalClass.isAssignableFrom(includedBuild.getClass())) { return GradleReflectionUtil.reflectiveCall(includedBuild, "getTarget", Object.class); } return includedBuild; }