Skip to content

Commit ef4c7a3

Browse files
feat: address review comments
1 parent 658bc81 commit ef4c7a3

9 files changed

Lines changed: 57 additions & 39 deletions

File tree

.github/CI_DOCUMENTATION.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ All workflows use standardized tooling versions to ensure consistency:
2828

2929
| Tool | Version | Defined In |
3030
| ----------------------- | ------------------------ | ------------------------------ |
31-
| **Java** | `17` (Zulu distribution) | All Android workflows |
31+
| **Java** | `21` (Zulu distribution) | All Android workflows |
3232
| **Gradle** | `8.12` | `gradle-wrapper.properties` |
3333
| **Android Build Tools** | `35.0.0` | `example/android/build.gradle` |
3434
| **NDK** | `27.3.13750724` | `example/android/build.gradle` |
@@ -56,7 +56,7 @@ All workflows use standardized tooling versions to ensure consistency:
5656
| Tool | Version | Defined In |
5757
| ------------------------ | --------------------- | ----------------------- |
5858
| **React Native Harness** | `1.0.0-alpha.21` | `package.json` |
59-
| **Android Emulator** | Pixel_API_34 (API 34) | `rn-harness.config.mjs` |
59+
| **Android Emulator** | Pixel_API_35 (API 35) | `rn-harness.config.mjs` |
6060
| **iOS Simulator** | iPhone 17 (iOS 26.2) | `rn-harness.config.mjs` |
6161

6262
### GitHub Actions
@@ -129,7 +129,7 @@ All actions are pinned to specific commit SHAs for security and reproducibility:
129129
- Sets up Android emulator
130130
- Runs harness tests
131131
- Runs on: `ubuntu-latest`
132-
- Uses: Java 17, Android SDK, NDK 27.3.13750724
132+
- Uses: Java 21, Android SDK, NDK 27.3.13750724
133133

134134
#### 3. iOS Build & Test (`.github/workflows/ios.yml`)
135135

@@ -149,7 +149,7 @@ The harness tests are configured in `example/rn-harness.config.mjs`:
149149
runners: [
150150
androidPlatform({
151151
name: 'android',
152-
device: androidEmulator('Pixel_API_34'),
152+
device: androidEmulator('Pixel_API_35'),
153153
bundleId: 'mendixnative.example',
154154
}),
155155
applePlatform({
@@ -186,7 +186,7 @@ yarn harness:ios:with:build
186186

187187
### Android
188188

189-
Make sure emulator with name `Pixel_API_34` is up and running
189+
Make sure emulator with name `Pixel_API_35` is up and running
190190

191191
```bash
192192
corepack enable
@@ -205,7 +205,7 @@ yarn harness:android:with:build
205205
- Check AVD cache - clear `avd-*` entries if corrupted
206206
- Verify KVM is enabled (workflows handle this automatically)
207207
- Check emulator logs in workflow output
208-
- Ensure AVD_NAME matches harness config (`Pixel_API_34`)
208+
- Ensure AVD_NAME matches harness config (`Pixel_API_35`)
209209

210210
**iOS simulator not found or fails to boot:**
211211

.github/actions/setup-node-yarn/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ runs:
55
using: 'composite'
66
steps:
77
- name: Setup Node
8-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
8+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.2.2
99
with:
1010
node-version-file: '.nvmrc'
1111

@@ -19,7 +19,7 @@ runs:
1919
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
2020

2121
- name: Cache Yarn dependencies
22-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
22+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.0
2323
with:
2424
path: |
2525
${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -35,7 +35,7 @@ runs:
3535

3636
- name: Cache built library
3737
id: cache-lib
38-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
38+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.0
3939
with:
4040
path: lib
4141
key: ${{ runner.os }}-lib-${{ hashFiles('src/**/*.{ts,tsx,js,jsx}', 'package.json', 'tsconfig.json') }}

.github/workflows/android.yml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ on:
44
workflow_call:
55

66
env:
7-
DEVICE_API_LEVEL: '34'
7+
DEVICE_API_LEVEL: '35'
88
DEVICE_ARCH: 'x86_64'
99
DEVICE_TARGET: 'google_apis'
10-
AVD_NAME: 'Pixel_API_34'
10+
AVD_NAME: 'Pixel_API_35'
11+
ANDROID_SDK_ROOT: /usr/local/lib/android/sdk
12+
ANDROID_HOME: /usr/local/lib/android/sdk
13+
NDK_VERSION: '27.3.13750724'
1114

1215
jobs:
1316
android:
@@ -17,19 +20,31 @@ jobs:
1720

1821
steps:
1922
- name: Checkout
20-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
23+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v4.2.2
2124

2225
- name: Setup Project
2326
uses: ./.github/actions/setup-node-yarn
2427

2528
- name: Setup Java
26-
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e
29+
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v4.7.1
2730
with:
2831
distribution: 'zulu'
29-
java-version: '17'
32+
java-version: '21'
33+
34+
# Restore NDK from cache before sdkmanager runs.
35+
- name: Cache NDK
36+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.0
37+
with:
38+
path: ${{ env.ANDROID_SDK_ROOT }}/ndk/${{ env.NDK_VERSION }}
39+
key: ${{ runner.os }}-ndk-${{ env.NDK_VERSION }}
3040

3141
- name: Setup Android SDK
32-
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407
42+
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.1
43+
with:
44+
packages: |
45+
tools
46+
platform-tools
47+
ndk;${{ env.NDK_VERSION }}
3348
3449
- name: Enable KVM
3550
run: |
@@ -38,18 +53,8 @@ jobs:
3853
sudo udevadm trigger --name-match=kvm
3954
ls /dev/kvm
4055
41-
# Build dependencies (only if APK not cached)
42-
- name: Cache NDK
43-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
44-
with:
45-
path: /usr/local/lib/android/sdk/ndk/27.3.13750724
46-
key: ${{ runner.os }}-ndk-27.3.13750724
47-
48-
- name: Install NDK
49-
run: echo "y" | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;27.3.13750724"
50-
5156
- name: Cache Gradle
52-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
57+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.0
5358
with:
5459
path: |
5560
~/.gradle/caches
@@ -67,7 +72,7 @@ jobs:
6772
run: yarn app:package:android
6873

6974
- name: AVD cache
70-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
75+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.0
7176
with:
7277
path: |
7378
~/.android/avd/*
@@ -76,7 +81,7 @@ jobs:
7681

7782
# Create AVD (only if not cached, runs after build)
7883
- name: Create AVD and generate snapshot for caching
79-
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b
84+
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # v2.33.0
8085
with:
8186
api-level: ${{ env.DEVICE_API_LEVEL }}
8287
target: ${{ env.DEVICE_TARGET }}
@@ -91,7 +96,7 @@ jobs:
9196

9297
# Launch AVD, install app, and run tests
9398
- name: Run Harness E2E tests
94-
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b
99+
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # v2.33.0
95100
with:
96101
working-directory: example
97102
api-level: ${{ env.DEVICE_API_LEVEL }}

.github/workflows/ios.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
21+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v4.2.2
2222

2323
- name: Setup Project
2424
uses: ./.github/actions/setup-node-yarn
@@ -27,15 +27,15 @@ jobs:
2727
run: sudo xcode-select -s /Applications/Xcode_26.2.app
2828

2929
- name: Setup Ruby
30-
uses: ruby/setup-ruby@d697be2f83c6234b20877c3b5eac7a7f342f0d0c
30+
uses: ruby/setup-ruby@d697be2f83c6234b20877c3b5eac7a7f342f0d0c # v1.204.0
3131
with:
3232
ruby-version: '3.2'
3333
bundler-cache: true
3434
working-directory: example
3535

3636
# Build dependencies (only if app not cached)
3737
- name: Cache CocoaPods
38-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
38+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.0
3939
with:
4040
path: |
4141
example/ios/Pods

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
13+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v4.2.2
1414

1515
- name: Setup Project
1616
uses: ./.github/actions/setup-node-yarn

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
25+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v4.2.2
2626
with:
2727
fetch-depth: 0
2828

@@ -66,15 +66,15 @@ jobs:
6666
echo "tgz=mendix-native-${{ steps.bump.outputs.version }}.tgz" >> $GITHUB_OUTPUT
6767
6868
- name: Create GitHub Release
69-
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
69+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
7070
with:
7171
tag_name: ${{ steps.bump.outputs.version }}
7272
name: ${{ steps.bump.outputs.version }}
7373
body: ${{ steps.changelog.outputs.notes }}
7474
files: ${{ steps.pack.outputs.tgz }}
7575

7676
- name: Create Pull Request
77-
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412
77+
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
7878
with:
7979
commit-message: "chore: release ${{ steps.bump.outputs.version }}"
8080
branch: release/${{ steps.bump.outputs.version }}

android/build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ android {
5252
}
5353

5454
compileOptions {
55-
sourceCompatibility JavaVersion.VERSION_17
56-
targetCompatibility JavaVersion.VERSION_17
55+
sourceCompatibility JavaVersion.VERSION_21
56+
targetCompatibility JavaVersion.VERSION_21
57+
}
58+
59+
kotlinOptions {
60+
jvmTarget = "21"
5761
}
5862

5963
sourceSets {

example/android/app/build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@ android {
105105
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
106106
}
107107
}
108+
109+
compileOptions {
110+
sourceCompatibility JavaVersion.VERSION_21
111+
targetCompatibility JavaVersion.VERSION_21
112+
}
113+
114+
kotlinOptions {
115+
jvmTarget = "21"
116+
}
108117
}
109118

110119
dependencies {

example/rn-harness.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const config = {
2020
runners: [
2121
androidPlatform({
2222
name: 'android',
23-
device: androidEmulator('Pixel_API_34'),
23+
device: androidEmulator('Pixel_API_35'),
2424
bundleId: 'mendixnative.example',
2525
}),
2626
applePlatform({

0 commit comments

Comments
 (0)