How do I use ./amper publish? Could you provide an...
# amper
s
How do I use ./amper publish? Could you provide an example for publishing to mavenLocal?
j
Just as a heads-up, publication is still quite experimental at the moment (I mean more than the project itself) and JVM-only, so please expect some bumps 🙂 With that said, you should be able to publish to maven local by adding it with
publish: true
in your
module.yaml
this way:
Copy code
repositories:
  - id: mavenLocal
    url: mavenLocal # special case handled this way
    resolve: false
    publish: true
Then you can use
./amper publish mavenLocal
or
./amper task publishJvmToMavenLocal
to publish there.
s
Ok Thanks.
@Joffrey Is there a workaround to publish a KMP library to Maven local using standalone Amper? Can we use custom Gradle script?
j
If you're using standalone Amper, you won't be able to use Gradle scripts to tweak this, so unfortunately I don't think there is a workaround for this. I think KMP publications will be missing metadata at the very least. I would have to check for the klib stuff, but without metadata there is no real point in publishing a KMP lib I believe.