diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/test/DistroTestPlugin.java b/buildSrc/src/main/java/org/elasticsearch/gradle/test/DistroTestPlugin.java index 37c87f0969cb3..75fe8157c0f8a 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/test/DistroTestPlugin.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/test/DistroTestPlugin.java @@ -287,8 +287,7 @@ private static TaskProvider configureCopyUpgradeTask(Project project, Vers Path upgradePath = upgradeDir.get().getAsFile().toPath(); // write bwc version, and append -SNAPSHOT if it is an unreleased version - ExtraPropertiesExtension extraProperties = project.getExtensions().getByType(ExtraPropertiesExtension.class); - BwcVersions bwcVersions = (BwcVersions) extraProperties.get("bwcVersions"); + BwcVersions bwcVersions = BuildParams.getBwcVersions(); final String upgradeFromVersion; if (bwcVersions.unreleasedInfo(upgradeVersion) != null) { upgradeFromVersion = upgradeVersion.toString() + "-SNAPSHOT";