Skip to content

Commit 9cee43b

Browse files
authored
Remove dependency license check for all org.elasticsearch (elastic#96355)
The dependency licenses check is meant to ensure we have license information included for external dependencies. The check currently looks at all non-project dependencies. This works within the elasticsearch repo, since internal dependencies are all project dependencies. However, in serverless the dependencies will be jars from the upstream project (or rather not project dependencies, since it is a compound build). This commit loosens the dependency license check filter to omit any that have an elasticsearch group.
1 parent d67a3ed commit 9cee43b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/DependencyLicensesPrecommitPlugin.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ public TaskProvider<? extends Task> createTask(Project project) {
3131
Configuration compileOnly = project.getConfigurations()
3232
.getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME);
3333
t.setDependencies(
34-
runtimeClasspath.fileCollection(dependency -> dependency instanceof ProjectDependency == false).minus(compileOnly)
34+
runtimeClasspath.fileCollection(
35+
dependency -> dependency instanceof ProjectDependency == false
36+
&& dependency.getGroup().startsWith("org.elasticsearch") == false
37+
).minus(compileOnly)
3538
);
3639
});
3740
return dependencyLicenses;

0 commit comments

Comments
 (0)