This repository contains a simple library project, intended to demonstrate a Kotlin Multiplatform library that is deployable to Maven Central.
The library has only one function: generate the Fibonacci sequence starting from platform-provided numbers. Also, it has a test for each platform just to be sure that tests run.
Note that no other actions or tools usually required for the library development are set up, such as tracking of backwards compatibility, explicit API mode, licensing, contribution guideline, code of conduct and others. You can find a guide for best practices for designing Kotlin libraries here.
Please find the detailed guide here.
- Put credentials in your user-level Gradle properties file (
~/.gradle/gradle.properties), not in this repository:mavenCentralUsername=<your-central-portal-username>mavenCentralPassword=<your-central-portal-token>signing.keyId=<your-pgp-key-id>signing.key=<ascii-armored-private-key-content>- The signing key passphrase property required by Gradle signing
- Set the release version in
library/build.gradle.kts. - Run:
./gradlew :library:publishAndReleaseToMavenCentral
- Verify published coordinates:
io.github.raulhuertas:library:<version>
(e.g checkPomFileFile...)
.\gradlew tasks --all | Select-String checkPomFileFor