Has anyone successfully pushed a multiplatform pro...
# multiplatform
s
Has anyone successfully pushed a multiplatform project to a maven repo in artifactory?
d
Not yet, but I'm currently trying.
s
I’m trying as well… I’m getting 405's and I’ve tried just about everything
s
https://github.com/sellmair/kompass This project pushes to bintray, if this would help in any way 🤔
s
I can successfully push to bintray as well with my OSP here: https://github.com/ScottPierce/kotlin-html
I’m following the same method for artifactory and it’s failing wit ha 405
s
You are pushing the .module files, right?
s
so the great thing about the kotlin-multiplatform plugin is it directly integrates with the maven-publish gradle plugin
and it takes care of everything for you… All you have to do is add the repository
and then you call that function from your project
and then a gradle task to publish is added to your module. It’s super simple
d
...so simple that it doesn't work.
c
This project publishes to Nexus OSS using standard maven publish and same should work on Artifactory https://github.com/open-jumpco/kfsm
r
Well I had absolutely no problem setting it up with maven-publish, what’s your issue? (publishing 10+ MPP projects to a private artifactory)
d
I'm trying everything I can and keep getting back total garbage from Gradle:
Copy code
> Could not upload to '<https://api.bintray.com/content/chris-hatton/lib/multi-mvp/0.0.1/property(class> java/lang/String, map(provider(?)))/property(class java.lang.String, fixed(class java.lang.String, multi-mvp))/property(class java.lang.String, map(provider(?)))/property(class java.lang.String, fixed(class java.lang.String, multi-mvp))-property(class java.lang.String, map(provider(?))).pom': HTTP/1.1 400 Bad Request [message:Unable to upload files: Maven group, artifact or version defined in the pom file do not match the file path 'property(class java/lang/String, map(provider(?)))/property(class java.lang.String, fixed(class java.lang.String, multi-mvp))/property(class java.lang.String, map(provider(?)))/property(class java.lang.String, fixed(class java.lang.String, multi-mvp))-property(class java.lang.String, map(provider(?))).pom']
Like it's interpreting my entire Maven Artifact identifer as some stringified object output.
I've only added:
Copy code
id("maven-publish")
    id("com.jfrog.bintray") version "1.7"
...and then configured the
bintray
section and:
Copy code
publishing {
    publications {
        val kotlinMultiplatform by getting {
            (this as MavenPublication).artifactId = "multi-mvp"
        }
    }
}
No idea where it's getting all this other stuff from.
r
Well you’re using an additional plugin so I can’t help with that. Publishing to Artifactory doesn’t requiring anything more
m
AFAIK jfrog.bintray plugin is deprecated, same can be done by pure maven-publish See here: https://github.com/msink/kotlin-libui/commit/3ed479e5f26e6bc71f3e5b338752dbb5ee2160b4
r
Well I was afraid to ask what this plugin was doing more than maven-publish lol
s
@darkmoon_uk I talked to Gael Ribes. He’s doing the same approach that I am. Also FYI - the simple approach I’ve outlined above works with bintray.
I’m now going to focus on user management
Got it working.
d
Publish works! 🎉 Thanks for the pointers @spierce7 @ribesg @Sebastian Sellmair [JB], you saved my sanity 🙏 (There are too many examples out there still using the Bintray plugin without disclaimer)