https://github.com/alikhachev/strange-gradle-dependency-resolution-sample
https://github.com/alikhachev/strange-gradle-dependency-resolution-sample
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/alikhachev/strange-gradle-dependency-resolution-sample
- Owner: ALikhachev
- Created: 2023-09-13T08:41:52.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-13T08:46:42.000Z (almost 3 years ago)
- Last Synced: 2025-01-10T10:32:38.067Z (over 1 year ago)
- Language: Kotlin
- Size: 341 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Strange Gradle dependency resolution sample
### Steps to reproduce the expected behavior:
1. `./gradlew clean`
2. `./gradlew -PincludeLib=true -Ppublish=true publish -PmyVersion=1.0.0-Beta1`
3. `./gradlew -PincludeLib=true -Ppublish=true publish -PmyVersion=1.0.0-Beta2`
4. `./gradlew test --scan`
The setup will add both `org.example:lib:1.0.0-Beta1` and `org.example:lib:1.0.0-Beta2`,
then the Gradle resolver will choose `org.example:lib:1.0.0-Beta2`

### Steps to reproduce the unexpected behavior:
1. `./gradlew clean`
2. `./gradlew -PincludeLib=true -Ppublish=true publish -PmyVersion=1.0.0-Beta1`
3. `./gradlew -PincludeLib=true -PmyVersion=1.0.0-Beta2 test --scan`
The setup will add both `org.example:lib:1.0.0-Beta1` and `project(":lib")` known
as `org.example:lib:1.0.0-Beta2`.
The latter should be chosen because it has a higher version, however, it doesn't work so. Perhaps it
should also be chosen because it's a local project with the same coordinates as requested artifact.
