gradle icon indicating copy to clipboard operation
gradle copied to clipboard

Setting a custom URL in a DependencyArtifact appears to be unused

Open aSemy opened this issue 5 months ago • 1 comments

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

aSemy avatar Jun 07 '25 17:06 aSemy

The issue is in the backlog of the relevant team and is prioritized by them.

ov7a avatar Jun 12 '25 09:06 ov7a

We should get rid of these methods -- we don't use them anywhere.

jvandort avatar Jun 27 '25 00:06 jvandort