mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-24 13:55:57 +00:00
Build: Allow deps to be a direct jar (#28096)
Currently the code which disable transitive dependencies assumes all deps are a "module dependency" in gradle. But a jar file dep is not. This commit relaxes the closure signature to allow any dependency and only enforce the transitive disabling for module dependencies.
This commit is contained in:
parent
2c24ac7426
commit
8ceae2a380
@ -32,6 +32,7 @@ import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.XmlProvider
|
||||
import org.gradle.api.artifacts.Configuration
|
||||
import org.gradle.api.artifacts.Dependency
|
||||
import org.gradle.api.artifacts.ModuleDependency
|
||||
import org.gradle.api.artifacts.ModuleVersionIdentifier
|
||||
import org.gradle.api.artifacts.ProjectDependency
|
||||
@ -274,8 +275,9 @@ class BuildPlugin implements Plugin<Project> {
|
||||
})
|
||||
|
||||
// force all dependencies added directly to compile/testCompile to be non-transitive, except for ES itself
|
||||
Closure disableTransitiveDeps = { ModuleDependency dep ->
|
||||
if (!(dep instanceof ProjectDependency) && dep.group.startsWith('org.elasticsearch') == false) {
|
||||
Closure disableTransitiveDeps = { Dependency dep ->
|
||||
if (dep instanceof ModuleDependency && !(dep instanceof ProjectDependency)
|
||||
&& dep.group.startsWith('org.elasticsearch') == false) {
|
||||
dep.transitive = false
|
||||
|
||||
// also create a configuration just for this dependency version, so that later
|
||||
|
Loading…
x
Reference in New Issue
Block a user