Slackbot
07/18/2023, 2:25 PMVampire
07/18/2023, 2:50 PMMartin
07/18/2023, 2:51 PMMartin
07/18/2023, 2:51 PMMartin
07/18/2023, 2:57 PMMartin
07/18/2023, 3:29 PMwithoutArtifactSelectors()
kindof works (although it's most likely less precise than patching the offending module):
configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "androidx.datastore" && requested.module.name =="datastore-preferences") {
artifactSelection {
this.withoutArtifactSelectors()
}
}
}
}
Martin
07/18/2023, 3:50 PMcomponents {
withModule("com.google.firebase:firebase-sessions") {
allVariants {
withDependencies {
val deps = this.toList()
removeAll { true }
addAll(deps.map {
if (it.name == "datastore-preferences") {
DirectDependencyMetadataImpl("androidx.datastore","datastore-preferences", "1.1.0-alpha04")
} else {
it
}
})
}
}
}
}
Vampire
07/18/2023, 3:52 PMMartin
07/18/2023, 3:52 PMartifactSelectors
Vampire
07/18/2023, 3:53 PMcomponents {
withModule("androidx.datastore:datastore-preferences") {
allVariants {
withFiles {
removeAllFiles()
addFile("datastore-preferences-1.1.0-alpha04.jar")
}
}
}
}
Martin
07/18/2023, 3:53 PMfirebase-session
that is a POM module that declares an .aar dependency on datastore-preference
Vampire
07/18/2023, 3:56 PMfirebase-session
dependency is the wrong one, then probably more
components {
withModule("com.google.firebase:firebase-sessions") {
allVariants {
withDependencies {
removeIf {
(it.group == "androidx.datastore") && (it.name == "datastore-preferences")
}
add("androidx.datastore:datastore-preferences:1.1.0-alpha04")
}
}
}
}
Martin
07/18/2023, 3:57 PMMartin
07/18/2023, 3:57 PMVampire
07/18/2023, 3:58 PMcomponents {
withModule("com.google.firebase:firebase-sessions") {
allVariants {
withDependencies {
find {
(it.group == "androidx.datastore") && (it.name == "datastore-preferences")
}?.attributes {
attribute(/* set the artifact type to jar */)
}
}
}
}
}
Vampire
07/18/2023, 3:58 PMMartin
07/18/2023, 3:58 PMMartin
07/18/2023, 3:59 PMfirebase-sessions
has no module file at allVampire
07/18/2023, 3:59 PMMartin
07/18/2023, 4:00 PM