File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ private static String distributionProjectName(ElasticsearchDistribution distribu
179179 Architecture architecture = distribution .getArchitecture ();
180180 String projectName = "" ;
181181
182- final String archString = platform == ElasticsearchDistribution . Platform . WINDOWS ? "" : "-" + architecture . toString (). toLowerCase ( );
182+ final String archString = calculateArchString ( distribution );
183183
184184 if (distribution .getBundledJdk () == false ) {
185185 projectName += "no-jdk-" ;
@@ -205,6 +205,20 @@ private static String distributionProjectName(ElasticsearchDistribution distribu
205205 return projectName + architecture .classifier + "-" + distribution .getType ().getName ();
206206 }
207207
208+ private static String calculateArchString (ElasticsearchDistribution distribution ) {
209+ Architecture architecture = distribution .getArchitecture ();
210+ ElasticsearchDistribution .Platform platform = distribution .getPlatform ();
211+ Version version = Version .fromString (distribution .getVersion ());
212+
213+ if (version .onOrAfter ("9.2.0" )) {
214+ return platform == ElasticsearchDistribution .Platform .WINDOWS ? "" : "-" + architecture .toString ().toLowerCase ();
215+ } else {
216+ return platform == ElasticsearchDistribution .Platform .WINDOWS || architecture == Architecture .AMD64
217+ ? ""
218+ : "-" + architecture .toString ().toLowerCase ();
219+ }
220+ }
221+
208222 public static class ProjectBasedDistributionDependency implements DistributionDependency {
209223
210224 private Function <String , Dependency > function ;
You can’t perform that action at this time.
0 commit comments