I am using okhttp 5.3.2. It has a transitive depen...
# squarelibraries
a
I am using okhttp 5.3.2. It has a transitive dependency on okio 3.17.0. I would like to use
mockwebserver
along with
okio-fakefilesystem
, but don’t know how to specify the gradle coordinate for
okio-filesystem
without hard coding the version like
androidTestImplementation("com.squareup.okio:okio-fakefilesystem:3.17.0")
. I would like to just say, in effect, androidTestImplementation ( okio-fakefilesystem appropriate for whatever version of okio I am using). Is there a good way to do this?
j
If we add dependency constraints you could probably add the dependency without the version and get the correct behavior automatically.
👍 1
There's https://github.com/square/okhttp/issues/9084, but that won't work across configurations
I don't know when we'll get to adding dependency constraints, but I really want to do it. I'm tracking that here: https://github.com/JakeWharton/multiproject-refactors/issues/4
a
Interesting, thanks Jake
s
Jake, I noticed this in your GH issue
BOMs suck. Gradle lets us automatically constrain sibling dependencies to have versions which match, so let's do that.
Would you mind sharing more about why you think BOMs suck?
j
They're opt-in, they have to be used in every project, they can cause dependency downgrades
🫡 1
r
@Severiano Jaramillo Jake wrote a great article about this for the Compose BOM: https://jakewharton.com/defuse-the-compose-bom/. I've "defused the BOM" on two projects at work (1 Android, 1 CMP) and a personal project. It's so much nicer without them. Every time I see a BOM now I want to remove it 😆
❤️ 1
thank you color 1
j
Yeah Compose BOM is even worse for anything but small projects because it ties together unrelated projects for no reason other than people just wanting one number to bump. And that's fine, but eventually I think you move past that and need to shed it.
❤️ 1
👍 1