Skip to content

Commit 74697b4

Browse files
committed
💥refreshVersions incompatible with resolutionStrategy #541
1 parent 1dcf5a2 commit 74697b4

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

sample-kotlin/sample-kotlin.gradle.kts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ repositories {
2929
if (testGcs) maven(url = "gcs://refreshversions-testing/maven")
3030
}
3131

32+
33+
3234
dependencies {
3335
if (testGcs) implementation("com.example:dummy-library-for-testing:_")
3436
implementation(AndroidX.core)
@@ -44,15 +46,34 @@ dependencies {
4446
implementation("org.mongodb:mongo-java-driver:3.11.0")
4547
implementation(kotlin("script-runtime"))
4648

47-
api("org.apache.poi:poi:_")
48-
api("org.apache.poi:poi-ooxml:_")
49+
4950

5051
// logging
5152
implementation(platform("org.apache.logging.log4j:log4j-bom:2.17.2"))
5253
runtimeOnly("org.apache.logging.log4j:log4j-slf4j-impl")
5354
runtimeOnly("org.apache.logging.log4j:log4j-jul")
5455
}
5556

57+
/*
58+
Reproducing steps for https://github.com/jmfayard/refreshVersions/issues/541
59+
60+
$ ./gradlew compileKotlin
61+
> Could not resolve all files for configuration ':compileClasspath'.
62+
> Could not find org.apache.poi:poi:_.
63+
64+
See stacktrace here https://scans.gradle.com/s/77ijrlpzd2kby/failure#1
65+
*/
66+
val apachePoi = "org.apache.poi:poi:_"
67+
val apachePoiXml = "org.apache.poi:poi-ooxml:_"
68+
dependencies {
69+
api(apachePoi)
70+
api(apachePoiXml)
71+
}
72+
configurations.all {
73+
resolutionStrategy.force(apachePoiXml)
74+
resolutionStrategy.force(apachePoi)
75+
}
76+
5677
getKotlinPluginVersion().let {
5778
val kotlinStdlibVersion = versionFor(dependencyNotation = Kotlin.stdlib)
5879
check(it == kotlinStdlibVersion) {

sample-kotlin/versions.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#### Dependencies and Plugin versions with their available updates.
2-
#### Generated by `./gradlew refreshVersions` version 0.41.0-SNAPSHOT
3-
#### Revision of dependency notations removals: 11
2+
#### Generated by `./gradlew refreshVersions` version 0.51.0-SNAPSHOT
3+
#### Revision of dependency notations removals: 14
44
####
55
#### Don't manually edit or split the comments that start with four hashtags (####),
66
#### they will be overwritten by refreshVersions.

0 commit comments

Comments
 (0)