Fetch transitive POMs in gradle resolver #1411
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1409, also #909 is tangentially related (note that this PR doesn't solve all multiplatform cases, but it should fix a bug where we weren't downloading or pinning all transitive KMP artifacts for the JVM platform).
https://repo1.maven.org/maven2/com/squareup/okio/okio/3.15.0/
okio
is a transitive dep ofokhttp
. It also turns out to be a Kotlin Multiplatform dependency with gradle metadata likebasically pointing to the JVM artifact to be downloaded. The JAR for
okio
is basically a placeholder https://repo1.maven.org/maven2/com/squareup/okio/okio/3.15.0/okio-3.15.0.jar (it's not actually a valid jar) but right now we don't download it:okio-jvm
,okio-js
,...) of the baseokio
dependency .okio
and fetch the POM for it, and indirectly its JAR. Even if this JAR is not useful in itself, it will ensure we get the children artifacts likeokio-jvm
and make them available in the final graph so that it can be used. This approach will help with other KMP dependencies as well.I'm open to other approaches, but I updated the regression tests and the existing tests pass with this approach.