I'm trying to build a simple library with a github...
# announcements
j
I'm trying to build a simple library with a github action that publishes jar files for js and jvm to a maven repository. I've so far tried jitpack and the github package repository and have had issues with both. With jitpack, it actually publishes something and I can see from the jitpack logs it generates js and jvm versions of the jar. My problem is I can't seem to figure out how to add the jvm version as a dependency. Here's an example oss project for which I tried to publish a jar: https://github.com/jillesvangurp/geogeometry. When I try to add the published jvm jar as a dependency, it instead pulls in the js version and then that doesn't work because it's not a js project. I think jitpack just randomly picks a jar that it keeps instead of publishing the -js and -jvm versions which is what I would expect. With the github package repository where I tried to do something similar, I get weird http errors. I've managed to publish a non multiplatform project to that before. I'd prefer to use that as this is a private project and I want to publish jars for internal use only.
Copy code
> Task :publishJvmPublicationToGitHubPackagesRepository FAILED
FAILURE: Build failed with an exception.
16 actionable tasks: 16 executed

* What went wrong:
Execution failed for task ':publishJvmPublicationToGitHubPackagesRepository'.
> Failed to publish publication 'jvm' to repository 'GitHubPackages'
   > Could not PUT '<https://github.com/formation-res/FormationSchemaModel/formation-res/FormationSchemaModel-jvm/0.1-SNAPSHOT/maven-metadata.xml>'. Received status code 422 from server: Unprocessable Entity
I'm currently looking at the articact repository in Google cloud as another option. But before I go there, which package repositories actually work properly with the multi platform plugin? I'd be interested in people that have successfully published multiplatform library jars anywhere. This is kind of crucial to me because I want to reuse some code across web, jvm, and ultimately android & ios as well.
It seems the google artifact repository is actually not ready for this as it's a closed alpha release. But would still be interested in alternatives.