From b0bbe1c5547260f5730c462d4ebd66515f723a31 Mon Sep 17 00:00:00 2001 From: penguindan Date: Sat, 22 Nov 2025 15:06:37 -0800 Subject: [PATCH 1/8] Add iOS target Signed-off-by: penguindan --- README.md | 1 + kotlin-sdk/build.gradle.kts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 00539473..90c2b349 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ The following [Kotlin Multiplatform Targets](https://www.jetbrains.com/help/kotl | ✅ | Android | SDK 21+ | | ✅ | JVM | JDK 11+ | | ✅ | Native | Linux x64 | +| ✅ | iOS | x64, Arm64, SimulatorArm64 | | ❌ | Native | [Other native targets](https://kotlinlang.org/docs/native-target-support.html) | | ✅ | Javascript (Node.js) | | | ✅ | Javascript (Browser) | | diff --git a/kotlin-sdk/build.gradle.kts b/kotlin-sdk/build.gradle.kts index 64fc263e..93a4b29b 100644 --- a/kotlin-sdk/build.gradle.kts +++ b/kotlin-sdk/build.gradle.kts @@ -40,6 +40,9 @@ kotlin { } } linuxX64 {} + iosX64() + iosArm64() + iosSimulatorArm64() js { nodejs {} browser { From 32d09ffbc9a3ca4d94e7685b72c8f3cc4404a416 Mon Sep 17 00:00:00 2001 From: penguindan Date: Sat, 22 Nov 2025 15:22:13 -0800 Subject: [PATCH 2/8] Address pr feedback Signed-off-by: penguindan --- kotlin-sdk/build.gradle.kts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/kotlin-sdk/build.gradle.kts b/kotlin-sdk/build.gradle.kts index 93a4b29b..e8d52602 100644 --- a/kotlin-sdk/build.gradle.kts +++ b/kotlin-sdk/build.gradle.kts @@ -40,9 +40,15 @@ kotlin { } } linuxX64 {} - iosX64() - iosArm64() - iosSimulatorArm64() + listOf( + iosX64(), + iosArm64(), + iosSimulatorArm64() + ).forEach { + it.binaries.framework { + baseName = "OpenFeature" + } + } js { nodejs {} browser { From 65343e975366bebf358b5556874859dbfa00fb91 Mon Sep 17 00:00:00 2001 From: penguindan Date: Sat, 6 Dec 2025 16:03:12 -0800 Subject: [PATCH 3/8] Utilize macos machines in CI Signed-off-by: penguindan --- .github/workflows/ci.yaml | 32 +++++++++++++++++++++++++-- .github/workflows/release_please.yaml | 24 +++++++++----------- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 603087e0..da810f71 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,14 +9,42 @@ on: - '*' jobs: - Tests: + test-linux: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 + + - name: Validate Gradle Wrapper + uses: gradle/actions/wrapper-validation@v5 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v5 # For browser tests - uses: browser-actions/setup-chrome@v2 - name: Run checks run: ./gradlew check --no-daemon --stacktrace + + test-mac: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Set up JDK 17 + uses: actions/setup-java@v5 + with: + java-version: 17 + distribution: 'zulu' + + - name: Validate Gradle Wrapper + uses: gradle/actions/wrapper-validation@v5 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v5 + + - name: Run checks (skipping Linux tests) + # linuxX64Test fails on macOS because it tries to execute the Linux binary + run: ./gradlew check -x linuxX64Test --no-daemon --stacktrace diff --git a/.github/workflows/release_please.yaml b/.github/workflows/release_please.yaml index 5b3ad12c..303c3b19 100644 --- a/.github/workflows/release_please.yaml +++ b/.github/workflows/release_please.yaml @@ -29,21 +29,13 @@ jobs: kotlin-release: needs: release-please - runs-on: ubuntu-latest + # Run on macOS to ensure we can publish iOS/Mac targets AND Linux/Android targets (via cross-compilation). + # This ensures a single consistent root module file is published. + runs-on: macos-latest if: ${{ needs.release-please.outputs.release_created }} steps: # The logic below handles the github release: - - name: Cache Gradle and wrapper - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Configure GPG Key run: | @@ -56,7 +48,7 @@ jobs: run: | mkdir -p ~/.gradle/ echo "signing.keyId=08C5EC5C" >> ~/.gradle/gradle.properties - echo "signing.secretKeyRingFile=/home/runner/.gnupg/secring.gpg" >> ~/.gradle/gradle.properties + echo "signing.secretKeyRingFile=$HOME/.gnupg/secring.gpg" >> ~/.gradle/gradle.properties echo "signing.password=$GPG_SIGNING_KEY_PASSWORD" >> ~/.gradle/gradle.properties env: GPG_SIGNING_KEY_ID: ${{ secrets.GPG_SIGNING_KEY_ID }} @@ -68,6 +60,9 @@ jobs: java-version: 17 distribution: 'zulu' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v5 + - name: Grant Permission for Gradlew to Execute run: chmod +x gradlew @@ -75,6 +70,9 @@ jobs: env: CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} + # We publish everything from Mac. + # Note: This will compile Linux targets but NOT run their tests (which would fail on Mac). + # We assume CI has already validated Linux tests. run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon --stacktrace - name: Clean up signing secrets From ec47813d28f6576c91d084aad9fff3d635365b74 Mon Sep 17 00:00:00 2001 From: penguindan Date: Sat, 6 Dec 2025 16:14:03 -0800 Subject: [PATCH 4/8] Remove linux removal, kotlin seems to exclude those automatically Signed-off-by: penguindan --- .github/workflows/ci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index da810f71..c5ea840e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -46,5 +46,4 @@ jobs: uses: gradle/actions/setup-gradle@v5 - name: Run checks (skipping Linux tests) - # linuxX64Test fails on macOS because it tries to execute the Linux binary - run: ./gradlew check -x linuxX64Test --no-daemon --stacktrace + run: ./gradlew check --no-daemon --stacktrace From 736bb85018d4151a7118e6656693a0e49278cf36 Mon Sep 17 00:00:00 2001 From: penguindan Date: Sat, 6 Dec 2025 16:20:30 -0800 Subject: [PATCH 5/8] Remove unused comment Signed-off-by: penguindan --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c5ea840e..09febd10 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,5 +45,5 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v5 - - name: Run checks (skipping Linux tests) + - name: Run checks run: ./gradlew check --no-daemon --stacktrace From 1db2ca4d1a36da3a0efb814a53ef862c5bfa0de8 Mon Sep 17 00:00:00 2001 From: penguindan Date: Sat, 6 Dec 2025 16:29:01 -0800 Subject: [PATCH 6/8] Cancel previous runs of the ci on new commit Signed-off-by: penguindan --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 09febd10..a68e944d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,6 +8,10 @@ on: branches: - '*' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test-linux: runs-on: ubuntu-latest From a2acf7b327b30f0355edb22f77e2fcf9bf5f8739 Mon Sep 17 00:00:00 2001 From: penguindan Date: Sat, 6 Dec 2025 16:30:09 -0800 Subject: [PATCH 7/8] Remove unnecessary AI comments Signed-off-by: penguindan --- .github/workflows/release_please.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release_please.yaml b/.github/workflows/release_please.yaml index 303c3b19..1c903c9c 100644 --- a/.github/workflows/release_please.yaml +++ b/.github/workflows/release_please.yaml @@ -70,9 +70,7 @@ jobs: env: CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} - # We publish everything from Mac. - # Note: This will compile Linux targets but NOT run their tests (which would fail on Mac). - # We assume CI has already validated Linux tests. + run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon --stacktrace - name: Clean up signing secrets From 930642385597500ff612b8828a6293c07bf7aa6e Mon Sep 17 00:00:00 2001 From: penguindan Date: Sat, 6 Dec 2025 16:36:40 -0800 Subject: [PATCH 8/8] Remove gradle validation, already provided by setup-gradle Signed-off-by: penguindan --- .github/workflows/ci.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a68e944d..d6a80cce 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,9 +19,6 @@ jobs: - name: Checkout uses: actions/checkout@v6 - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@v5 - - name: Setup Gradle uses: gradle/actions/setup-gradle@v5 @@ -43,9 +40,6 @@ jobs: java-version: 17 distribution: 'zulu' - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@v5 - - name: Setup Gradle uses: gradle/actions/setup-gradle@v5