5.0.0-alpha.7 maven jar doesn't contain classes
develar opened this issue · comments
See published com.squareup.okhttp3:okhttp:5.0.0-alpha.7
version on Maven Central — https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/5.0.0-alpha.7/
okhttp-5.0.0-alpha.7.jar 2022-04-27 03:58 13361
13 KB.
But sources JAR is correct, 753 KB.
It's a mulitplatform jar, see https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp-jvm/5.0.0-alpha.7/
Can you explain what you are trying to do, what you build system is?
They definitely work from other projects, at least gradle.
And it's the same for a while now for other projects like https://repo1.maven.org/maven2/com/squareup/okio/okio/3.1.0/
It is broken since alpha 3. After alpha 3 I cannot update to alpha 4 and so on.
Can you explain what you are trying to do, what you build system is?
IntelliJ IDEA (JPS). Our project is 20+ years old and maven/gradle are not suitable for us :) Two JARs are used to compile:
~/.m2/repository/com/squareup/okhttp3/okhttp/5.0.0-alpha.3/okhttp-5.0.0-alpha.3.jar
~/.m2/repository/com/squareup/okio/okio-jvm/3.0.0/okio-jvm-3.0.0.jar
It was so before I do not see any transitive dependencies. Also I do not see any dependencies in POM file.
Do I use a wrong maven coordinates? Is something changed? Maybe you forgot to add some new dependency to Maven POM after some splitting in alpha 4+ (but why in this case sources jar is correct as before)?
And it's the same for a while now for other projects like
Yep. okio jar is also empty... The question in this case — where I supposed to get a correct JARs if published to a Maven Central are empty and do not have any transitive dependencies except kotlin?
I'm going to close this, because there isn't a change for us to make here.
I'd like to understand the answer to your question too, perhaps a stackoverflow question or an issue in the jetbrains issue tracker asking for a solution?
I suspect these files tell the kotlin compiler what else to request https://repo1.maven.org/maven2/com/squareup/okio/okio/3.1.0/okio-3.1.0-kotlin-tooling-metadata.json
But that's a guess.
I believe the fix is to use the -jvm
artifact. Like this:
com.squareup.okhttp3:okhttp-jvm:5.0.0-alpha.7
We aught to call this out in our 5.x upgrade guide.
Indeed, that's because gradle’s dependency management engine is variant aware. Thanks for so quick response!
An issue https://youtrack.jetbrains.com/issue/KT-52323/Add-option-to-publish-Kotlin-multiplatform-library-in-a-way-that was created to make preserving backward compatibility more easier.