diff --git a/.github/workflows/android-build-custom-dev-app.yml b/.github/workflows/android-build-custom-dev-app.yml index 5cb144fb..e14256fa 100644 --- a/.github/workflows/android-build-custom-dev-app.yml +++ b/.github/workflows/android-build-custom-dev-app.yml @@ -29,9 +29,8 @@ jobs: - name: npm install run: npm ci - - name: Add NDK 26.1.10909125 - run: echo "y" | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;26.1.10909125" - + - name: Add NDK 27.3.13750724 + run: echo "y" | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;27.3.13750724" - name: Build with Gradle run: ./gradlew assembleDevDebug working-directory: ./android diff --git a/android/build.gradle b/android/build.gradle index f3780238..166aa9cd 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -12,7 +12,7 @@ buildscript { androidXCore = "1.6.0" androidXBrowser = "1.3.0" - ndkVersion = "26.1.10909125" + ndkVersion = "27.3.13750724" } repositories { google() @@ -84,6 +84,31 @@ allprojects { maven { url "$rootDir/../node_modules/@notifee/react-native/android/libs" } + + // Build all modules with Android 16KB pages enabled + plugins.withId('com.android.application') { + android { + defaultConfig { + externalNativeBuild { + cmake { + arguments "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON" + } + } + } + } + } + + plugins.withId('com.android.library') { + android { + defaultConfig { + externalNativeBuild { + cmake { + arguments "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON" + } + } + } + } + } } } diff --git a/ios/Podfile.lock b/ios/Podfile.lock index bcde2b20..750a4f13 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -52,11 +52,10 @@ PODS: - RNCAsyncStorage - SSZipArchive - Yoga - - op-sqlite (15.0.7): + - op-sqlite (15.1.5): - DoubleConversion - glog - hermes-engine - - OpenSSL-Universal - RCT-Folly (= 2024.11.18.00) - RCTRequired - RCTTypeSafety @@ -74,7 +73,6 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - OpenSSL-Universal (3.3.3001) - RCT-Folly (2024.11.18.00): - boost - DoubleConversion @@ -2237,9 +2235,9 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - SDWebImage (5.21.2): - - SDWebImage/Core (= 5.21.2) - - SDWebImage/Core (5.21.2) + - SDWebImage (5.21.3): + - SDWebImage/Core (= 5.21.3) + - SDWebImage/Core (5.21.3) - SDWebImageAVIFCoder (0.11.1): - libavif/core (>= 0.11.0) - SDWebImage (~> 5.10) @@ -2350,7 +2348,6 @@ SPEC REPOS: - libavif - libdav1d - libwebp - - OpenSSL-Universal - SDWebImage - SDWebImageAVIFCoder - SDWebImageWebPCoder @@ -2549,8 +2546,7 @@ SPEC CHECKSUMS: libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 MendixNative: 358ef00fc883a39da69680c6c2a09ecf85a0b887 - op-sqlite: 12554de3e1a0cb86cbad3cf1f0c50450f57d3855 - OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2 + op-sqlite: a8239b295e2fad068d587c16d6c41d1ffd98ede8 RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82 RCTDeprecation: be794de7dc6ed8f9f7fbf525f86e7651b8b68746 RCTRequired: a83787b092ec554c2eb6019ff3f5b8d125472b3b @@ -2629,7 +2625,7 @@ SPEC CHECKSUMS: RNScreens: 0d4cb9afe052607ad0aa71f645a88bb7c7f2e64c RNSVG: 8ad5c94593e5e4a6e133e6934e2188e3c688d27a RNVectorIcons: bd818296a51dc2bb8c3bd97a3ca399df1afe216d - SDWebImage: 9f177d83116802728e122410fb25ad88f5c7608a + SDWebImage: 16309af6d214ba3f77a7c6f6fdda888cb313a50a SDWebImageAVIFCoder: afe194a084e851f70228e4be35ef651df0fc5c57 SDWebImageWebPCoder: e38c0a70396191361d60c092933e22c20d5b1380 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 diff --git a/mendix-native-0.3.2.tgz b/mendix-native-0.3.2.tgz new file mode 100644 index 00000000..cbb0bf01 Binary files /dev/null and b/mendix-native-0.3.2.tgz differ diff --git a/package-lock.json b/package-lock.json index 7a201501..4725b803 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@d11/react-native-fast-image": "8.11.1", "@gorhom/bottom-sheet": "5.1.1", "@notifee/react-native": "9.1.8", - "@op-engineering/op-sqlite": "15.0.7", + "@op-engineering/op-sqlite": "15.1.5", "@react-native-async-storage/async-storage": "2.0.0", "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-community/cli": "18.0.1", @@ -21,7 +21,7 @@ "@react-native-community/datetimepicker": "8.2.0", "@react-native-picker/picker": "2.11.0", "@react-navigation/native": "7.0.14", - "mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.1/mendix-native-v0.3.1.tgz", + "mendix-native": "./mendix-native-0.3.2.tgz", "react-native": "0.78.2", "react-native-blob-util": "0.21.3", "react-native-bootsplash": "6.3.10", @@ -2166,9 +2166,9 @@ } }, "node_modules/@op-engineering/op-sqlite": { - "version": "15.0.7", - "resolved": "https://registry.npmjs.org/@op-engineering/op-sqlite/-/op-sqlite-15.0.7.tgz", - "integrity": "sha512-EExQtz7QPxPWXQ00QjFiHvbohMOrpEzFbWbWZ1BXvZeDafbYJxS6DYRO08w5Q44WnaNbxBfmRc/1/seZuHMI/g==", + "version": "15.1.5", + "resolved": "https://registry.npmjs.org/@op-engineering/op-sqlite/-/op-sqlite-15.1.5.tgz", + "integrity": "sha512-xfbKbVerEF6e1mz4AT3bzwVErJ2J14QKi6OzRbbC/y26liPXYbhPCfGovEhh7gMZtN30crH1z4haFJFvAlserg==", "license": "MIT", "workspaces": [ "example" @@ -6465,9 +6465,9 @@ "license": "MIT" }, "node_modules/mendix-native": { - "version": "0.3.1", - "resolved": "https://github.com/mendix/mendix-native/releases/download/v0.3.1/mendix-native-v0.3.1.tgz", - "integrity": "sha512-32CKVOlWFyY4vb0EVmCvJfeMwnfwTkaTEr2dmuQWIkACOhXToHHeYlcY/bRHT62qhNkEMh7FnTD/fw30k3w2fQ==", + "version": "0.3.2", + "resolved": "file:mendix-native-0.3.2.tgz", + "integrity": "sha512-GfC6yfNZj0NZzXXqz2Uc5uF9ba8Va9FnhsZNatAJ+n7GCvagKu8D5Zpq4v+EONkCzTc/U5BP3znwpObteRtl1g==", "license": "MIT", "workspaces": [ "example" diff --git a/package.json b/package.json index 3d27e192..fcaf82f3 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "dependencies": { "@d11/react-native-fast-image": "8.11.1", "@gorhom/bottom-sheet": "5.1.1", - "mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.1/mendix-native-v0.3.1.tgz", - "@op-engineering/op-sqlite": "15.0.7", + "mendix-native": "./mendix-native-0.3.2.tgz", + "@op-engineering/op-sqlite": "15.1.5", "@react-native-async-storage/async-storage": "2.0.0", "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-community/cli": "18.0.1", diff --git a/patches/@op-engineering+op-sqlite+15.0.7.patch b/patches/@op-engineering+op-sqlite+15.1.5.patch similarity index 77% rename from patches/@op-engineering+op-sqlite+15.0.7.patch rename to patches/@op-engineering+op-sqlite+15.1.5.patch index 586def4d..54df1906 100644 --- a/patches/@op-engineering+op-sqlite+15.0.7.patch +++ b/patches/@op-engineering+op-sqlite+15.1.5.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@op-engineering/op-sqlite/android/build.gradle b/node_modules/@op-engineering/op-sqlite/android/build.gradle -index d36fd85..7513556 100644 +index 7df016d..dc94a38 100644 --- a/node_modules/@op-engineering/op-sqlite/android/build.gradle +++ b/node_modules/@op-engineering/op-sqlite/android/build.gradle @@ -1,5 +1,4 @@ @@ -69,7 +69,7 @@ index d36fd85..7513556 100644 println "[OP-SQLITE] using sqlcipher." } else if(useLibsql) { diff --git a/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp b/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp -index 8feaf77..261ec22 100644 +index 5912d7b..f2cb85b 100644 --- a/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp +++ b/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp @@ -19,8 +19,8 @@ struct OPSQLiteBridge : jni::JavaClass { @@ -79,7 +79,7 @@ index 8feaf77..261ec22 100644 - makeNativeMethod("clearStateNativeJsi", - OPSQLiteBridge::clearStateNativeJsi)}); + makeNativeMethod("clearStateNativeJsi", OPSQLiteBridge::clearStateNativeJsi), -+ makeNativeMethod("deleteAllDBsJsi", OPSQLiteBridge::deleteAllDBsJsi)}); ++ makeNativeMethod("deleteAllDBsJsi", OPSQLiteBridge::deleteAllDBsJsi)}); } private: @@ -89,7 +89,7 @@ index 8feaf77..261ec22 100644 } + + static bool deleteAllDBsJsi(jni::alias_ref thiz) { -+ return opsqlite::deleteAllDbs(); ++ return opsqlite::deleteAllDbs(); + } }; @@ -118,20 +118,20 @@ index 44f86df..9d9f710 100644 val instance = OPSQLiteBridge() } diff --git a/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt b/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt -index 688832f..9ea814b 100644 +index 49a01b9..bdfa829 100644 --- a/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt +++ b/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt -@@ -13,7 +13,7 @@ import java.io.OutputStream +@@ -12,7 +12,7 @@ import java.io.InputStream + import java.io.OutputStream import com.facebook.react.util.RNLog; - //@ReactModule(name = OPSQLiteModule.NAME) -internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) { +class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) { override fun getName(): String { return NAME } -@@ -56,6 +56,17 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB - return true +@@ -54,6 +54,16 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB + throw Exception("Do not call getDylibPath on Android") } + @ReactMethod(isBlockingSynchronousMethod = true) @@ -143,16 +143,15 @@ index 688832f..9ea814b 100644 + fun deleteAllDBs() { + OPSQLiteBridge.instance.deleteAllDBs(); + } -+ + @ReactMethod fun moveAssetsDatabase(args: ReadableMap, promise: Promise) { val filename = args.getString("filename")!! diff --git a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp -index 85710ee..8cf10f2 100644 +index eadea09..5701d15 100644 --- a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp +++ b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp -@@ -889,6 +889,10 @@ void DBHostObject::invalidate() { +@@ -675,6 +675,10 @@ void DBHostObject::invalidate() { #endif } @@ -164,23 +163,23 @@ index 85710ee..8cf10f2 100644 } // namespace opsqlite diff --git a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h -index cc174b7..ff36f74 100644 +index 68a9bc4..142e9d9 100644 --- a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h +++ b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h -@@ -73,6 +73,7 @@ class JSI_EXPORT DBHostObject : public jsi::HostObject { - void on_commit(); - void on_rollback(); - void invalidate(); -+ void drop(); - ~DBHostObject() override; +@@ -68,6 +68,7 @@ public: + void on_commit(); + void on_rollback(); + void invalidate(); ++ void drop(); + ~DBHostObject() override; - private: -diff --git a/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp b/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp -index 5e1c1de..dc21c65 100644 ---- a/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp -+++ b/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp -@@ -36,6 +36,13 @@ void invalidate() { - dbs.clear(); + private: +diff --git a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.cpp b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.cpp +index e33579a..791fa70 100644 +--- a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.cpp ++++ b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.cpp +@@ -42,6 +42,13 @@ void invalidate() { + dbs.clear(); } +bool deleteAllDbs() { @@ -191,12 +190,12 @@ index 5e1c1de..dc21c65 100644 +} + void install(jsi::Runtime &rt, - const std::shared_ptr &invoker, + const std::shared_ptr &_invoker, const char *base_path, const char *crsqlite_path, -diff --git a/node_modules/@op-engineering/op-sqlite/cpp/bindings.h b/node_modules/@op-engineering/op-sqlite/cpp/bindings.h +diff --git a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp index 91511ab..cc73dfe 100644 ---- a/node_modules/@op-engineering/op-sqlite/cpp/bindings.h -+++ b/node_modules/@op-engineering/op-sqlite/cpp/bindings.h +--- a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp ++++ b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp @@ -14,6 +14,7 @@ void install(jsi::Runtime &rt, const char *base_path, const char *crsqlite_path, const char *sqlite_vec_path); @@ -206,18 +205,33 @@ index 91511ab..cc73dfe 100644 } // namespace opsqlite diff --git a/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec b/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec -index 375cc3e..e6fce21 100644 +index 32906a2..4a1e452 100644 --- a/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec +++ b/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec -@@ -1,4 +1,3 @@ +@@ -1,12 +1,13 @@ -require "json" require_relative "./generate_tokenizers_header_file" log_message = lambda do |message| -@@ -39,11 +38,10 @@ else - app_package = JSON.parse(File.read(File.join(__dir__, "example", "package.json"))) + puts "\e[34m#{message}\e[0m" end ++# NOTE: Disabled as redundant for now, re-enable if needed + # In the sample app the dir is not inside of node_modules +-is_user_app = __dir__.include?("node_modules") ++# is_user_app = __dir__.include?("node_modules") ++is_user_app = false + package = JSON.parse(File.read(File.join(__dir__, "package.json"))) + app_package = nil + package_json_path = nil +@@ -32,13 +33,13 @@ else + package_json_path = File.join(__dir__, "example", "package.json") + end + +-app_package = JSON.parse(File.read(package_json_path)) ++# NOTE: Disabled as redundant for now, re-enable if needed ++# app_package = JSON.parse(File.read(package_json_path)) + -op_sqlite_config = app_package["op-sqlite"] -use_sqlcipher = false +use_sqlcipher = true @@ -228,7 +242,7 @@ index 375cc3e..e6fce21 100644 phone_version = false sqlite_flags = "" fts5 = false -@@ -51,37 +49,6 @@ rtree = false +@@ -46,37 +47,6 @@ rtree = false use_sqlite_vec = false tokenizers = [] @@ -247,19 +261,19 @@ index 375cc3e..e6fce21 100644 - -if phone_version then - if use_sqlcipher then -- raise "SQLCipher is not supported with phone version" +- raise "SQLCipher is not supported with phone version. It cannot load extensions." - end - - if use_crsqlite then -- raise "CRSQLite is not supported with phone version" +- raise "CRSQLite is not supported with phone version. It cannot load extensions." - end - - if rtree then -- raise "RTree is not supported with phone version" +- raise "RTree is not supported with phone version. It cannot load extensions." - end - - if use_sqlite_vec then -- raise "SQLite Vec is not supported with phone version" +- raise "SQLite Vec is not supported with phone version. It cannot load extensions." - end -end -