Skip to content

Commit 5c1f1c1

Browse files
Merge pull request #1082 from mendix/moo/MOO-1945-android-16kb-pages-compat
[MOO-1945] Android 16kb pages compatibility
2 parents 8c2e592 + c45fd98 commit 5c1f1c1

File tree

6 files changed

+70
-19
lines changed

6 files changed

+70
-19
lines changed

.github/workflows/android-build-custom-dev-app.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/setup-java@v3
1919
with:
2020
distribution: 'temurin'
21-
java-version: 17
21+
java-version: 21
2222

2323
- name: actions/setup-node
2424
uses: actions/setup-node@v3
@@ -29,8 +29,8 @@ jobs:
2929
- name: npm install
3030
run: npm ci
3131

32-
- name: Add NDK 26.1.10909125
33-
run: echo "y" | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;26.1.10909125"
32+
- name: Add NDK 27.3.13750724
33+
run: echo "y" | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;27.3.13750724"
3434

3535
- name: Build with Gradle
3636
run: ./gradlew assembleDevDebug

.github/workflows/ios-build-custom-dev-app.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v3
16-
- name: switch XCode to 15.4
16+
- name: switch XCode to 16.4
1717
run: |
18-
sudo xcode-select -s /Applications/Xcode_15.4.app
18+
sudo xcode-select -s /Applications/Xcode_16.4.app
1919
2020
- name: update bundle identifier in Dev config
2121
shell: bash

android/build.gradle

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
androidXCore = "1.6.0"
1313
androidXBrowser = "1.3.0"
1414

15-
ndkVersion = "26.1.10909125"
15+
ndkVersion = "27.3.13750724"
1616
}
1717
repositories {
1818
google()
@@ -66,6 +66,31 @@ allprojects {
6666
}
6767
maven { url "https://packages.rnd.mendix.com/jcenter" }
6868
}
69+
70+
// Build all modules with Android 16KB pages enabled
71+
plugins.withId('com.android.application') {
72+
android {
73+
defaultConfig {
74+
externalNativeBuild {
75+
cmake {
76+
arguments "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
77+
}
78+
}
79+
}
80+
}
81+
}
82+
83+
plugins.withId('com.android.library') {
84+
android {
85+
defaultConfig {
86+
externalNativeBuild {
87+
cmake {
88+
arguments "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
89+
}
90+
}
91+
}
92+
}
93+
}
6994
}
7095

7196
apply plugin: "com.facebook.react.rootproject"

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"dependencies": {
1010
"@gorhom/bottom-sheet": "^5.1.1",
11-
"@mendix/native": "9.0.7",
11+
"@mendix/native": "9.1.0",
1212
"@op-engineering/op-sqlite": "9.2.7",
1313
"@react-native-async-storage/async-storage": "2.0.0",
1414
"@react-native-camera-roll/camera-roll": "7.4.0",

patches/@op-engineering+op-sqlite+9.2.7.patch

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/@op-engineering/op-sqlite/android/build.gradle b/node_modules/@op-engineering/op-sqlite/android/build.gradle
2-
index 4186aa3..242dd95 100644
2+
index 427aa8e..8cc5fab 100644
33
--- a/node_modules/@op-engineering/op-sqlite/android/build.gradle
44
+++ b/node_modules/@op-engineering/op-sqlite/android/build.gradle
55
@@ -1,5 +1,4 @@
@@ -39,7 +39,24 @@ index 4186aa3..242dd95 100644
3939
if(useSQLCipher) {
4040
println "[OP-SQLITE] using SQLCipher 🔒"
4141
} else if(useLibsql) {
42-
@@ -171,8 +156,8 @@ android {
42+
@@ -167,13 +152,25 @@ android {
43+
"**/libfbjni.so",
44+
"**/libreactnative.so",
45+
]
46+
+
47+
+ if (!useCRSQLite) {
48+
+ excludes += [
49+
+ "**/libcrsqlite.so"
50+
+ ]
51+
+ }
52+
+
53+
+ if (!useSqliteVec) {
54+
+ excludes += [
55+
+ "**/libsqlite_vec.so"
56+
+ ]
57+
+ }
58+
}
59+
4360
}
4461

4562
compileOptions {
@@ -50,6 +67,15 @@ index 4186aa3..242dd95 100644
5067
}
5168

5269
externalNativeBuild {
70+
@@ -203,7 +200,7 @@ dependencies {
71+
implementation 'com.facebook.react:react-native'
72+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
73+
if (useSQLCipher) {
74+
- implementation('com.android.ndk.thirdparty:openssl:1.1.1q-beta-1')
75+
+ implementation('io.github.ronickg:openssl:3.3.2-1')
76+
}
77+
}
78+
5379
diff --git a/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp b/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp
5480
index ed599ea..4813667 100644
5581
--- a/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp
@@ -83,7 +109,7 @@ index ed599ea..4813667 100644
83109
}
84110
\ No newline at end of file
85111
diff --git a/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt b/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt
86-
index 7445a4c..a9dcf14 100644
112+
index 7445a4c..7e6db78 100644
87113
--- a/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt
88114
+++ b/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt
89115
@@ -13,6 +13,8 @@ class OPSQLiteBridge {
@@ -146,10 +172,10 @@ index 6179cfc..7663a49 100644
146172
fun moveAssetsDatabase(args: ReadableMap, promise: Promise) {
147173
val filename = args.getString("filename")!!
148174
diff --git a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp
149-
index c3663dd..a81af62 100644
175+
index c6bda2a..aefaefb 100644
150176
--- a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp
151177
+++ b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp
152-
@@ -946,6 +946,16 @@ void DBHostObject::set(jsi::Runtime &rt, const jsi::PropNameID &name,
178+
@@ -963,6 +963,16 @@ void DBHostObject::set(jsi::Runtime &rt, const jsi::PropNameID &name,
153179

154180
void DBHostObject::invalidate() { invalidated = true; }
155181

@@ -167,10 +193,10 @@ index c3663dd..a81af62 100644
167193

168194
} // namespace opsqlite
169195
diff --git a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h
170-
index dcb694c..8ec3f4b 100644
196+
index d11c212..175b546 100644
171197
--- a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h
172198
+++ b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h
173-
@@ -52,6 +52,7 @@ public:
199+
@@ -58,6 +58,7 @@ public:
174200
void set(jsi::Runtime &rt, const jsi::PropNameID &name,
175201
const jsi::Value &value);
176202
void invalidate();
@@ -179,7 +205,7 @@ index dcb694c..8ec3f4b 100644
179205

180206
private:
181207
diff --git a/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp b/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp
182-
index b471d3d..e06ec0c 100644
208+
index a4cd737..e88831d 100644
183209
--- a/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp
184210
+++ b/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp
185211
@@ -47,6 +47,13 @@ void clearState() {

0 commit comments

Comments
 (0)