gradle
gradle copied to clipboard
Setting a custom URL in a DependencyArtifact appears to be unused
Current Behavior
It is possible to set a custom URL in a DependencyArtifact, but it appears to have no effect.
https://docs.gradle.org/8.14/kotlin-dsl/gradle/org.gradle.api.artifacts/-dependency-artifact/get-url.html
Expected Behavior
setUrl() and getUrl() are deprecated and removed.
Context (optional)
I could not see any usage of DependencyArtifact.getUrl(), except in tests. I assume they are only intended for testing.
Self-contained Reproducer Project
dependencies {
"fooConf"("blah:blah:1.2.3") {
artifact {
url = "https://example.com/bar.zip"
}
}
}
Gradle version
8.14.2
Build scan URL (optional)
No response
Your Environment (optional)
No response
The issue is in the backlog of the relevant team and is prioritized by them.
We should get rid of these methods -- we don't use them anywhere.