Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a9e1efb
Update Gradle wrapper to 8.14.4 and foojay-resolver-convention plugin…
solcott May 21, 2026
46f7d52
Update GitHub Actions in CI workflow
solcott May 21, 2026
e868eb1
Remove redundant explicit nativeMain dependency on commonMain
solcott May 21, 2026
62df721
Remove deprecated kotlin.js.compiler=ir from gradle.properties
solcott May 21, 2026
5e18d8f
Move ktlint import-ordering rule to .editorconfig
solcott May 21, 2026
7e08d00
Update Kotlin compiler options and multiplatform configuration
solcott May 21, 2026
1ff1f6d
Configure Gradle Daemon JVM toolchain to Azul JDK 17
solcott May 21, 2026
62826b3
Modernize build configuration and centralize version management
solcott May 22, 2026
0cfd5ea
Migrate to Android Kotlin Multiplatform Library plugin and update dep…
solcott May 22, 2026
33bf89c
Configure KMMBridge for Swift Package Manager publishing
solcott May 26, 2026
f7295eb
Modernize Gradle configuration and migrate plugins to Version Catalog
solcott May 29, 2026
5836b87
Update atomicFu to 0.33.0 in libs.versions.toml
solcott Jun 1, 2026
1b4c80f
Update CI workflow to include test reporting and conditional Codecov …
solcott Jun 1, 2026
5050081
Configure JS test tasks in KotlinMultiplatformConventionPlugin
solcott Jun 1, 2026
399d0ce
Add write permissions to KMMBridge workflows
solcott Jun 1, 2026
84faa30
Enable KMM publishing and configure GitHub release artifacts
solcott Jun 1, 2026
ce6ae01
Remove JUnit report publishing from CI workflow
solcott Jun 2, 2026
6afe5d2
Consolidate KMMBridge publishing into one release-only workflow
solcott Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
root = true

[*.{kt,kts}]
ktlint_standard_import-ordering = disabled
11 changes: 11 additions & 0 deletions .github/workflows/KMMBridge-Publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Publish both the debug and release XCFrameworks to a single GitHub Release.
name: KMMBridge-Publish
on:
workflow_dispatch:

jobs:
call-publish:
permissions:
contents: write
packages: write
uses: ./.github/workflows/create_swift_package.yml
20 changes: 12 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ on:
jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
pull-requests: write
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
api-level: [ 29 ]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# PR builds (including forks) check out the PR head from its source repo;
# push builds fall back to the pushed ref on this repo. Without the
Expand All @@ -31,26 +35,26 @@ jobs:
persist-credentials: false

- name: Set up JDK 17
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'

- name: Setup Gradle
uses: gradle/gradle-build-action@v3
uses: gradle/actions/setup-gradle@v6

- name: Grant execute permission for Gradlew
run: chmod +x gradlew

- name: Build and Test with Coverage
run: ./gradlew clean build koverXmlReport --stacktrace
run: ./gradlew clean build koverXmlReport --stacktrace --continue

- name: Upload Coverage to Codecov
# Secrets (including CODECOV_TOKEN) are not exposed to fork PRs, so the
# upload would fail under fail_ci_if_error. Skip it for forks; coverage is
# still uploaded and enforced for same-repo PRs and pushes to main.
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request' }}
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/reports/kover/coverage.xml
Expand All @@ -65,16 +69,16 @@ jobs:
needs: build-and-test
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up JDK 17
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'

- name: Setup Gradle
uses: gradle/gradle-build-action@v3
uses: gradle/actions/setup-gradle@v6

- name: Grant execute permission for Gradlew
run: chmod +x gradlew
Expand Down
67 changes: 63 additions & 4 deletions .github/workflows/create_swift_package.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,66 @@
name: Create Swift Package
# Based on: https://github.com/touchlab/KMMBridgeSPMQuickStart/blob/main/.github/workflows/Base-Publish.yml
# Publishes the release XCFramework (store.xcframework.zip) to a GitHub Release.
# For debugging Kotlin from Xcode, use KMMBridge local/dev publishing instead.
name: Base-Publish

on:
workflow_dispatch:
workflow_call:

permissions:
contents: write
packages: write

jobs:
publish:
uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildbranches.yml@v0.6
kmmbridgepublish:
concurrency: "kmmbridgepublish-${{ github.repository }}"
runs-on: macos-latest
steps:
- name: Checkout the repo with tags
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true

- name: Retrieve Version
id: versionPropertyValue
run: |
VERSION=$(grep -w 'VERSION_NAME' gradle.properties | cut -d'=' -f2)
echo "propVal=$VERSION" >> $GITHUB_OUTPUT

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6

- name: Grant execute permission for Gradlew
run: chmod +x gradlew

- name: Create or Find Artifact Release
id: devrelease
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: "${{ steps.versionPropertyValue.outputs.propVal }}"

- name: Build and Publish
run: |
./gradlew kmmBridgePublish \
-PNATIVE_BUILD_TYPE=RELEASE \
-PGITHUB_ARTIFACT_RELEASE_ID=${{ steps.devrelease.outputs.id }} \
-PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} \
-PGITHUB_REPO=${{ github.repository }} \
-PENABLE_PUBLISHING=true \
--no-daemon --info --stacktrace
env:
GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m"

- uses: touchlab/ga-update-release-tag@v1
id: update-release-tag
with:
commitMessage: "KMP SPM package release for ${{ steps.versionPropertyValue.outputs.propVal }}"
tagMessage: "KMP release version ${{ steps.versionPropertyValue.outputs.propVal }}"
tagVersion: ${{ steps.versionPropertyValue.outputs.propVal }}
76 changes: 38 additions & 38 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.android.kotlin.multiplatform) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.dokka) apply false
alias(libs.plugins.vanniktech.maven.publish) apply false
alias(libs.plugins.atomicfu) apply false
alias(libs.plugins.kotlin.cocoapods) apply false
alias(libs.plugins.ktlint)
id("com.diffplug.spotless") version "6.4.1"
}

buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
google()
}

dependencies {
classpath(libs.android.gradle.plugin)
classpath(libs.kotlin.gradle.plugin)
classpath(libs.kotlin.serialization.plugin)
classpath(libs.dokka.gradle.plugin)
classpath(libs.ktlint.gradle.plugin)
classpath(libs.jacoco.gradle.plugin)
classpath(libs.maven.publish.plugin)
classpath(libs.atomic.fu.gradle.plugin)
classpath(libs.kmmBridge.gradle.plugin)
classpath(libs.binary.compatibility.validator)
}
}

allprojects {
repositories {
mavenCentral()
google()
}
alias(libs.plugins.spotless)
alias(libs.plugins.binary.compatibility.validator) apply false
alias(libs.plugins.kmmbridge.github) apply false
}

val ktLintVersion = libs.versions.ktlint.get()
subprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "com.diffplug.spotless")

ktlint {
disabledRules.add("import-ordering")
}

spotless {
kotlin {
target("src/**/*.kt")
}
}
ktlint {
version = ktLintVersion
additionalEditorconfig.put("ktlint_standard_function-expression-body", "disabled")
additionalEditorconfig.put("ktlint_standard_class-signature", "disabled")
additionalEditorconfig.put("ktlint_standard_spacing-between-declarations-with-comments", "disabled")
additionalEditorconfig.put("ktlint_standard_when-entry-bracing", "disabled")
additionalEditorconfig.put("ktlint_standard_blank-line-between-when-conditions", "disabled")
additionalEditorconfig.put("ktlint_standard_kdoc", "disabled")
additionalEditorconfig.put("ktlint_standard_max-line-length", "disabled")
additionalEditorconfig.put("ktlint_standard_chain-method-continuation", "disabled")
additionalEditorconfig.put("ktlint_standard_function-signature", "disabled")
}
}

tasks {
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
withType<KotlinCompile> {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmCompat.get())
}
}

withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_11.name
targetCompatibility = JavaVersion.VERSION_11.name
sourceCompatibility = libs.versions.jvmCompat.get()
targetCompatibility = libs.versions.jvmCompat.get()
}
}

// Workaround for https://youtrack.jetbrains.com/issue/KT-62040
tasks.getByName("wrapper")

tasks.named<UpdateDaemonJvm>("updateDaemonJvm") {
// JDK 17 is the minimum version supported by the org.gradle.toolchains.foojay-resolver-convention plugin
languageVersion = JavaLanguageVersion.of(17)
vendor.set(JvmVendorSpec.AZUL)
}
2 changes: 1 addition & 1 deletion cache/api/jvm/cache.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
public abstract interface class org/mobilenativefoundation/store/cache5/Cache {
public abstract fun getAllPresent ()Ljava/util/Map;
public fun getAllPresent ()Ljava/util/Map;
public abstract fun getAllPresent (Ljava/util/List;)Ljava/util/Map;
public abstract fun getIfPresent (Ljava/lang/Object;)Ljava/lang/Object;
public abstract fun getOrPut (Ljava/lang/Object;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
Expand Down
8 changes: 2 additions & 6 deletions cache/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,18 @@ plugins {
kotlin {

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(libs.kotlinx.atomic.fu)
api(projects.core)
implementation(libs.kotlinx.coroutines.core)
}
}
val commonTest by getting {
commonTest {
dependencies {
implementation(libs.junit)
implementation(libs.kotlinx.coroutines.test)
}
}
}
}

android {
namespace = "org.mobilenativefoundation.store.cache"
}
2 changes: 0 additions & 2 deletions cache/src/androidMain/AndroidManifest.xml

This file was deleted.

6 changes: 1 addition & 5 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ plugins {
kotlin {

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(libs.kotlin.stdlib)
}
}
}
}

android {
namespace = "org.mobilenativefoundation.store.core"
}
2 changes: 0 additions & 2 deletions core/src/androidMain/AndroidManifest.xml

This file was deleted.

4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# don't use jetifier, all deps are in androidX already android.enableJetifier=true
android.useAndroidX=true
org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.configureondemand=false
org.gradle.configuration-cache=true

# https://github.com/Kotlin/dokka/issues/1405
org.gradle.jvmargs=-XX:MaxMetaspaceSize=2G
Expand All @@ -23,6 +24,5 @@ POM_DEVELOPER_ID=dropbox
POM_DEVELOPER_NAME=Dropbox
kotlinx.atomicfu.enableJvmIrTransformation=false
kotlinx.atomicfu.enableJsIrTransformation=false
kotlin.js.compiler=ir

org.jetbrains.compose.experimental.uikit.enabled=true
13 changes: 13 additions & 0 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/584d2f01a3c6e59ebb9478a182f5f714/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/7352c4c0c11b2db21fdd7541204de287/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/584d2f01a3c6e59ebb9478a182f5f714/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/7352c4c0c11b2db21fdd7541204de287/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/12ed6bcbab330f7afa37d16220b272a3/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/a7e1d8e6e800a81047d4aec26156ef5c/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/584d2f01a3c6e59ebb9478a182f5f714/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/7352c4c0c11b2db21fdd7541204de287/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3676ee7aa5095d7f22645eb0f22ca159/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/fc98f2d434c5796fe6ec02f0f22957b3/redirect
toolchainVendor=AZUL
toolchainVersion=17
Loading