How do I use ./amper publish? Could you provide an example for publishing to mavenLocal?
j
Joffrey
11/08/2024, 11:30 AM
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
Sabeeh
11/08/2024, 11:58 AM
Ok Thanks.
Sabeeh
11/08/2024, 12:00 PM
@Joffrey Is there a workaround to publish a KMP library to Maven local using standalone Amper? Can we use custom Gradle script?
j
joffrey
11/08/2024, 2:16 PM
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.