Skip to content

Commit aa78f65

Browse files
authored
[CI] Handle caching bwc dependencies more gracefully (#135417) (#135422)
We need to adjust the task dependencies for bwc builds not to be hardcoded. Not all bwc projects always carry a buildBwcLinuxTar task. (cherry picked from commit 6bc1e12) # Conflicts: # build.gradle
1 parent 841fe17 commit aa78f65

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,14 @@ allprojects {
333333
tasks.register('resolveAllDependencies', ResolveAllDependencies) {
334334
def ignoredPrefixes = [DistributionDownloadPlugin.ES_DISTRO_CONFIG_PREFIX, "jdbcDriver"]
335335
configs = project.configurations.matching { config -> ignoredPrefixes.any { config.name.startsWith(it) } == false }
336-
resolveJavaToolChain = true
336+
337+
if (project.path == ':') {
338+
resolveJavaToolChain = true
339+
}
340+
// ensure we have best possible caching of bwc builds
341+
if(project.path.startsWith(":distribution:bwc:")) {
342+
dependsOn project.tasks.matching { it.name == 'buildBwcLinuxTar' }
343+
}
337344
if (project.path.contains("fixture")) {
338345
dependsOn tasks.withType(ComposePull)
339346
}

0 commit comments

Comments
 (0)