Skip to content

Commit

Permalink
[7.17] Ignore configs from DistributionDownload plugin and bwc for re…
Browse files Browse the repository at this point in the history
…solveAllDependencies (#110828) (#110837)

* Ignore configs from DistributionDownload plugin and bwc for resolveAllDependencies (#110828)
skip resolving toolchains
  • Loading branch information
breskeby authored Jul 23, 2024
1 parent aabe0a3 commit 0d3f9b7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ public class DistributionDownloadPlugin implements Plugin<Project> {
private static final String FAKE_SNAPSHOT_IVY_GROUP = "elasticsearch-distribution-snapshot";
private static final String DOWNLOAD_REPO_NAME = "elasticsearch-downloads";
private static final String SNAPSHOT_REPO_NAME = "elasticsearch-snapshots";
public static final String DISTRO_EXTRACTED_CONFIG_PREFIX = "es_distro_extracted_";
public static final String DISTRO_CONFIG_PREFIX = "es_distro_file_";

public static final String ES_DISTRO_CONFIG_PREFIX = "es_distro_";
public static final String DISTRO_EXTRACTED_CONFIG_PREFIX = ES_DISTRO_CONFIG_PREFIX + "extracted_";
public static final String DISTRO_CONFIG_PREFIX = ES_DISTRO_CONFIG_PREFIX + "file_";

private final ObjectFactory objectFactory;
private NamedDomainObjectContainer<ElasticsearchDistribution> distributionsContainer;
Expand Down
13 changes: 12 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ import static org.elasticsearch.gradle.util.GradleUtils.maybeConfigure
import org.gradle.plugins.ide.eclipse.model.ProjectDependency
import org.elasticsearch.gradle.internal.BaseInternalPluginBuildPlugin
import org.elasticsearch.gradle.internal.ResolveAllDependencies
import org.elasticsearch.gradle.internal.info.BuildParams
import org.elasticsearch.gradle.util.GradleUtils
import org.gradle.plugins.ide.eclipse.model.AccessRule
import org.gradle.plugins.ide.eclipse.model.ProjectDependency
import org.elasticsearch.gradle.DistributionDownloadPlugin

import java.nio.file.Files
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING

Expand Down Expand Up @@ -273,10 +279,15 @@ allprojects {
}

tasks.register('resolveAllDependencies', ResolveAllDependencies) {
configs = project.configurations
def ignoredPrefixes = [DistributionDownloadPlugin.ES_DISTRO_CONFIG_PREFIX, "jdbcDriver"]
configs = project.configurations.matching { config -> ignoredPrefixes.any { config.name.startsWith(it) } == false }
if (project.path.contains("fixture")) {
dependsOn tasks.withType(ComposePull)
}
if (project.path.contains(":distribution:docker")) {
enabled = false
}

}

def checkPart1 = tasks.register('checkPart1')
Expand Down
4 changes: 0 additions & 4 deletions qa/os/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,3 @@ subprojects { Project platformProject ->
hostEnv 'VAGRANT_PROJECT_DIR', platformProject.projectDir.absolutePath
}
}
tasks.named('resolveAllDependencies') {
// avoid resolving all elasticsearch distros
enabled = false
}

0 comments on commit 0d3f9b7

Please sign in to comment.