diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 12452a9..01780f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,9 +4,7 @@ on: [push] jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 with: @@ -30,3 +28,11 @@ jobs: files: ${{ github.workspace }}/build/reports/kover/report.xml env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + call-kmmbridge-publish: + permissions: + contents: write + packages: write + uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildautoversion.yml@v1.1 + with: + jvmVersion: 17 + versionBaseProperty: LIBRARY_VERSION \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 781e577..5c10817 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,4 +8,7 @@ org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\= kotlin.mpp.enableCInteropCommonization=true #Development -development=true \ No newline at end of file +development=true + +LIBRARY_VERSION=0.1.0 +GROUP=com.snacks.lemonsqueezy \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bb016fd..cc61af4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,6 +16,9 @@ kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } #publishing multiplatform-swiftpackage = { id = "io.github.luca992.multiplatform-swiftpackage", version.ref = "multiplatform-swiftpackage" } +touchlab-kmmbridge = { id = "co.touchlab.kmmbridge", version.ref = "touchlab-kmmbridge" } + + [versions] kotlin = "2.0.0-Beta2" @@ -30,6 +33,7 @@ assertj-core = "3.24.2" # plugins multiplatform-swiftpackage = "2.2.1" +touchlab-kmmbridge = "0.5.1" [libraries] diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 2d3c6f2..d9ff226 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -3,6 +3,8 @@ plugins { alias(libs.plugins.kotlinx.serialization) alias(libs.plugins.multiplatform.swiftpackage) alias(libs.plugins.kover) + alias(libs.plugins.touchlab.kmmbridge) + `maven-publish` } kotlin { @@ -49,6 +51,22 @@ multiplatformSwiftPackage { } } +addGithubPackagesRepository() + +kmmbridge { + mavenPublishArtifacts() + spm() +// spm { +// swiftToolsVersion = "5.9" +// platforms { +// iOS { v("14") } +// macOS { v("13") } +// watchOS { v("7") } +// tvOS { v("14") } +// } +// } +} + tasks { named("jvmTest") { useJUnitPlatform()