forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Gradle wrapper to 8.8 (elastic#108021)
Fix incompatibility with 8.8 and our internal api usages - Update ospackage to a version that contains a fix we provided - Tweak build logic to avoid deprecation warnings - Use newer permission api - Use custom shadowplugin - Rework ElasticsearchDistribution dependencies resolution - Update Gradle wrapper to 8.8 (cherry picked from commit 8ac3e3d) # Conflicts: # gradle/verification-metadata.xml
- Loading branch information
Showing
29 changed files
with
346 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
build-tools-internal/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...ools-internal/src/main/java/org/elasticsearch/gradle/internal/util/DependenciesUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
package org.elasticsearch.gradle.internal.util; | ||
|
||
import org.gradle.api.artifacts.Configuration; | ||
import org.gradle.api.artifacts.ResolvableDependencies; | ||
import org.gradle.api.artifacts.component.ComponentIdentifier; | ||
import org.gradle.api.artifacts.result.ResolvedComponentResult; | ||
import org.gradle.api.artifacts.result.ResolvedDependencyResult; | ||
import org.gradle.api.file.FileCollection; | ||
import org.gradle.api.specs.AndSpec; | ||
import org.gradle.api.specs.Spec; | ||
|
||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
|
||
public class DependenciesUtils { | ||
|
||
public static FileCollection createFileCollectionFromNonTransitiveArtifactsView( | ||
Configuration configuration, | ||
Spec<ComponentIdentifier> componentFilter | ||
) { | ||
ResolvableDependencies incoming = configuration.getIncoming(); | ||
return incoming.artifactView(viewConfiguration -> { | ||
Set<ComponentIdentifier> firstLevelDependencyComponents = incoming.getResolutionResult() | ||
.getRootComponent() | ||
.map( | ||
rootComponent -> rootComponent.getDependencies() | ||
.stream() | ||
.filter(dependency -> dependency instanceof ResolvedDependencyResult) | ||
.map(dependency -> (ResolvedDependencyResult) dependency) | ||
.filter(dependency -> dependency.getSelected() instanceof ResolvedComponentResult) | ||
.map(dependency -> dependency.getSelected().getId()) | ||
.collect(Collectors.toSet()) | ||
) | ||
.get(); | ||
viewConfiguration.componentFilter( | ||
new AndSpec<>(identifier -> firstLevelDependencyComponents.contains(identifier), componentFilter) | ||
); | ||
}).getFiles(); | ||
} | ||
|
||
} |
55 changes: 0 additions & 55 deletions
55
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/util/HdfsUtils.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
8.7 | ||
8.8 |
Oops, something went wrong.