-
Notifications
You must be signed in to change notification settings - Fork 30
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
Gradle centralised repo management causes problems #628
Comments
Hello. We are also experiencing an issue where placing our repository within a gradle publishing task as the gradle docs have mentioned are causing issues. Only way it works is to remove it which doesn't bode well for us. Is there any update on if this will be fixed? It's currently a blocker for us |
workaround: .settings.gradle.kts dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
// ...
}
} |
Updating that in our settings.gradle file produced this error:
Does it have anything to do with the fact that this is in our settings.gradle and not in a kts file? |
@samiabuzeineh-wk this exception is logged, but it doesn't fail the build: https://github.com/sourcegraph/scip-java/blob/main/semanticdb-gradle-plugin/src/main/scala/SemanticdbGradlePlugin.scala#L450-L454 We expect some projects to fail there if they don't have publishing settings. It's a piece of tech debt to make this exception less scary as it's not the first time I see it being interpreted as an error, whereas it really isn't :) |
Ah yes, I do see the indexing was successfully uploaded despite these "errors" :) Thank you all for your help, that workaround seems to have done the trick! |
All credit to @dmmedakin! FWIW I remember making an attempt to set this value dynamically during indexing, but Gradle wouldn't let me as some state was closed. At some point I will restore that branch to see what's up. |
Stack overflow: https://stackoverflow.com/questions/69163511/build-was-configured-to-prefer-settings-repositories-over-project-repositories-b
Gradle docs: https://docs.gradle.org/7.4.2/userguide/dependency_management.html#sub:centralized-repository-declaration
The text was updated successfully, but these errors were encountered: