Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Central configuration option for GRADLE_LIBS_REPO_OVERRIDE #25840

Open
justintuchek opened this issue Jul 20, 2023 · 2 comments
Open

Central configuration option for GRADLE_LIBS_REPO_OVERRIDE #25840

justintuchek opened this issue Jul 20, 2023 · 2 comments
Labels

Comments

@justintuchek
Copy link

Expected Behavior

Provide a Gradle property that would allow an override for the Gradle library repository that can be committed to gradle.properties

org.gradle.libraries.sourceRepository=[internal-maven-url]

FWIW I'm willing to open a PR to provide this, more so looking for alignment that the team would accept something like this

We don't want to break anyone depending on the existing environment variable configuration. Introducing a second source for this does raise a question of which one should take precedent when both are present - if there's a norm for this within the project that would be helpful to hear (also poking around for a few examples)

Current Behavior (optional)

export GRADLE_LIBS_REPO_OVERRIDE=[internal-maven-url]

Context

Teams working in tighter security environments may have network traffic to external maven repositories blocked

This has a few negative impacts

  • Gradle isn't able to download Groovy resources that it needs/wants
  • Erodes developer productivity, during IDE sync we see ~1700 retries fail while attempting to fetch these which can add upwards of ~4 minutes to our IDE sync times

As mentioned in #24217 these is an existing workaround that resolve this issue

This is great for an individual but hard for teams. In an environment of hundreds or thousands of engineers we'd have to make a large announcement, hope they apply the workaround, etc. This is pretty expensive and results aren't very durable for new people joining a team, machine upgrades, etc

@justintuchek justintuchek added a:feature A new functionality to-triage labels Jul 20, 2023
@ov7a
Copy link
Member

ov7a commented Jul 21, 2023

Thank you for your interest in Gradle!

This feature request is in the backlog of the relevant team, but this area of Gradle is currently not a focus one, so it might take a while before it gets implemented.


Opening a PR for this would be appreciated, thanks! See CONTRIBUTING.md for more information.

As for your question about priority, see Build Environment documentation: environment variables have the lowest precedence.

@ov7a ov7a added in:build-environment Gradle, project, system and environment properties, CLI flags in:repository-declarations declaring repositories and filtering and removed to-triage labels Jul 21, 2023
@SidB3
Copy link
Contributor

SidB3 commented Jul 21, 2023

+1.

Also, some corporate artifactory/repository URLs require authentication. It would be great if the solution also supported providing a standard maven repo for downloading the libs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants