Skip to content

Commit 6e2e910

Browse files
authored
[CI] Handle caching bwc dependencies more gracefully (#135417) (#135421)
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 30c6168 commit 6e2e910

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,15 @@ allprojects {
338338
tasks.register('resolveAllDependencies', ResolveAllDependencies) {
339339
def ignoredPrefixes = [DistributionDownloadPlugin.ES_DISTRO_CONFIG_PREFIX, "jdbcDriver"]
340340
configs = project.configurations.matching { config -> ignoredPrefixes.any { config.name.startsWith(it) } == false }
341-
resolveJavaToolChain = true
341+
342+
if (project.path == ':') {
343+
resolveJavaToolChain = true
344+
}
345+
// ensure we have best possible caching of bwc builds
346+
if(project.path.startsWith(":distribution:bwc:")) {
347+
dependsOn project.tasks.matching { it.name == 'buildBwcLinuxTar' }
348+
}
349+
342350
if (project.path.contains("fixture")) {
343351
dependsOn tasks.withType(ComposePull)
344352
}

0 commit comments

Comments
 (0)