Getting Started
For Single Platform
In build.gradle.kts, add the dependency.
For Kotlin Multiplatform
In build.gradle.kts, add the dependency.
sourceSets {
val commonMain by getting {
dependencies {
api("io.github.sunny-chung:kdatetime-multiplatform:<version>")
// ...
}
}
// ...
Use in Swift / Objective-C (Optional)
Add a transitive export to the framework DSL in build.gradle.kts:
framework {
baseName = "shared"
transitiveExport = true
export("io.github.sunny-chung:kdatetime-multiplatform:<version>")
}
In native side, import your common framework to use.
Note the framework base name shared is customizable.
Build Manually
Kotlin Multiplatform builds artifacts targeting different OSes according to the machine OS where the build process takes place.
In the target OS,
- Grab a JDK with version 17 or above
git clonesource code- Execute
./gradlew clean publishToMavenLocal - In your project, add: