You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using a version range for a source dependency. We would also like to specify a preferred version. Gradle should clone the version specify by the preferred version.
Current Behavior
Currently, it seems that Gradle clones the newest version that satisfies the version range.
Context (optional)
No response
Steps to Reproduce
I've attached a Git repo for the dependency, called producer. This repo contains three tags, 1.0, 1.1 and 2.0.
I've also attached another Gradle project, called consumer, which uses the Git repo as a source dependency.
tudortimi
changed the title
Preferred version don't work with source dependencies
Dependency resolution of preferred version doesn't work with source dependencies
Jun 7, 2023
Expected Behavior
We're using a version range for a source dependency. We would also like to specify a preferred version. Gradle should clone the version specify by the preferred version.
Current Behavior
Currently, it seems that Gradle clones the newest version that satisfies the version range.
Context (optional)
No response
Steps to Reproduce
I've attached a Git repo for the dependency, called
producer
. This repo contains three tags,1.0
,1.1
and2.0
.I've also attached another Gradle project, called
consumer
, which uses the Git repo as a source dependency.consumer
has the following in itsbuild.gradle
:We see Gradle cloning version
1.1
, not the preferred1.0
version.To reproduce, download the two zips:
consumer.zip
producer.git.zip
You should see
Producing version 1.1
.Gradle version
6.7.1, 7.4.2, 8.1.1
Build scan URL (optional)
No response
Your Environment (optional)
No response
The text was updated successfully, but these errors were encountered: