Did anybody manage to publish a multiplatform proj...
# multiplatform
m
Did anybody manage to publish a multiplatform project to Sonatype? 🤔
A POM cannot have multiple artifacts with the same type and classifier. Already have MavenArtifact fluid-stdlib-metadatajar.ascasc:null, trying to add MavenArtifact fluid-stdlib-metadatajar.ascasc:null
(same here, unanswered: https://stackoverflow.com/questions/54318156/kotlin-multiplatform-library-project-upload-issue-pom-multiple-artifacts) configuration: https://github.com/fluidsonic/fluid-library/blob/master/sources/FluidLibraryVariantConfiguration.kt#L168
l
Sent a pull request that should fix your publication issue: https://github.com/fluidsonic/fluid-library/pull/1 EDIT: Probably doesn't fix the issue.
m
Thanks, but that's a Gradle plugin, not the multiplatform library I'm trying to publish 😄
It just uses that plugin
l
You should still look at the generated pom xml files on your machine to see where the issue comes from
null
doesn't seem to be a proper version number
m
According to the error message the problem is that
fluid-stdlib-metadata:jar.asc
is added twice.
whatever that is
l
You can see the pom xml files it in
your-module/build/publications
m
it looks fine:
Copy code
<project xmlns="<http://maven.apache.org/POM/4.0.0>" xsi:schemaLocation="<http://maven.apache.org/POM/4.0.0> <http://maven.apache.org/xsd/maven-4.0.0.xsd>" xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>">
  <!-- This module was also published with a richer model, Gradle metadata,  -->
  <!-- which should be used instead. Do not delete the following line which  -->
  <!-- is to indicate to Gradle or any Gradle module metadata file consumer  -->
  <!-- that they should prefer consuming it instead. -->
  <!-- do-not-remove: published-with-gradle-metadata -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.github.fluidsonic</groupId>
  <artifactId>fluid-stdlib-metadata</artifactId>
  <version>0.9.4</version>
  <dependencies>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib-common</artifactId>
      <version>1.3.31</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>
l
What about the non metadata module?
The jvm one
m
Also looks good. And works fine for Bintray. Just Sonatype publishing is failing
l
Bintray is not as regarding as Bintray regarding the corectness of the publication
This error still, makes me think of Java 9 jigsaw modules where you can't use the same package in different artifacts (but subpackages are fine as long as there's no classes in the same packages).
a
I saved a repo to my list
I don't remember who was it but he clamied that it works for him on Sonatype
one moment
check it out
m
Thank's, doing that right now. No luck so far but it definitely works differently.
a
i haven't tried it yet but i will this month
i'm going to write on my blog with the results
m
wow, that required quite a lot trial & error. Thank you for pointing me in the right direction, it finally works 🎉 https://github.com/fluidsonic/fluid-library/commit/cc561be4015e147c1309eb33c5c529e9b97c79db I have yet to test whether the library works properly once it's finally available on Maven Central.