diff --git a/android/build.gradle b/android/build.gradle index 668b13c..2dfbf94 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -23,7 +23,7 @@ buildscript { compose_ui_version = '1.7.4' camerax_version = "1.3.4" - ndkVersion = "26.1.10909125" + ndkVersion = "27.3.13750724" } repositories { @@ -45,6 +45,21 @@ buildscript { } } +project.ext { + set('react-native', [ + versions: [ + // Override Firebase BOM version to avoid updating to react-native-firebase 20.2.0+, + // which adds many new node_modules increasing the size significantly. + // Affected dependencies include the entire react-native-firebase suite e.g.: + // @react-native-firebase/app, @react-native-firebase/analytics, @react-native-firebase/crashlytics, @react-native-firebase/messaging + // NOTE: If updating to react-native-firebase 20.2.0+ is done, this override should be removed. + firebase: [ + bom: "33.1.1" + ], + ], + ]) +} + allprojects { tasks.withType(JavaCompile) { options.forkOptions.memoryMaximumSize = '512m' @@ -67,6 +82,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 0ae35ef..7b0b324 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -221,11 +221,10 @@ PODS: - nanopb/encode (= 2.30910.0) - nanopb/decode (2.30910.0) - nanopb/encode (2.30910.0) - - op-sqlite (15.0.7): + - op-sqlite (15.1.5): - DoubleConversion - glog - hermes-engine - - OpenSSL-Universal - RCT-Folly (= 2024.11.18.00) - RCTRequired - RCTTypeSafety @@ -243,7 +242,6 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - OpenSSL-Universal (3.3.3001) - PromisesObjC (2.4.0) - PromisesSwift (2.4.0): - PromisesObjC (= 2.4.0) @@ -2718,7 +2716,6 @@ SPEC REPOS: - libwebp - MultiplatformBleAdapter - nanopb - - OpenSSL-Universal - PromisesObjC - PromisesSwift - QRCodeReader.swift @@ -2977,8 +2974,7 @@ SPEC CHECKSUMS: MendixNative: 358ef00fc883a39da69680c6c2a09ecf85a0b887 MultiplatformBleAdapter: 5a6a897b006764392f9cef785e4360f54fb9477d nanopb: 438bc412db1928dac798aa6fd75726007be04262 - op-sqlite: 12554de3e1a0cb86cbad3cf1f0c50450f57d3855 - OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2 + op-sqlite: a8239b295e2fad068d587c16d6c41d1ffd98ede8 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851 QRCodeReader.swift: 373a389fe9a22d513c879a32a6f647c58f4ef572 diff --git a/package-lock.json b/package-lock.json index 0b7f99a..ffb9fba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@gorhom/bottom-sheet": "5.1.1", "@notifee/react-native": "9.1.8", "@octokit/rest": "^21.1.1", - "@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", @@ -30,7 +30,7 @@ "@react-native-picker/picker": "2.11.0", "@sbaiahmed1/react-native-biometrics": "0.4.0", "@swan-io/react-native-browser": "0.4.1", - "mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.1/mendix-native-v0.3.1.tgz", + "mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.2/mendix-native-v0.3.2.tgz", "react-native": "0.78.2", "react-native-ble-plx": "2.0.3", "react-native-blob-util": "0.21.3", @@ -2251,9 +2251,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" @@ -6751,9 +6751,9 @@ "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" }, "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": "https://github.com/mendix/mendix-native/releases/download/v0.3.2/mendix-native-v0.3.2.tgz", + "integrity": "sha512-ajVKxRHhKFZ/FYEgSbWvs0X0f0YvP8uAkKjbVONj0vUr2iQLdWpfA7MG9l9i3m/Dq+vDgN21ERy62O/8HIw3Cw==", "license": "MIT", "workspaces": [ "example" diff --git a/package.json b/package.json index 363abc1..a9576be 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,10 @@ }, "dependencies": { "@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", + "mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.2/mendix-native-v0.3.2.tgz", "@notifee/react-native": "9.1.8", "@octokit/rest": "^21.1.1", - "@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", diff --git a/patches/@op-engineering+op-sqlite+15.0.7.patch b/patches/@op-engineering+op-sqlite+15.1.5.patch similarity index 78% rename from patches/@op-engineering+op-sqlite+15.0.7.patch rename to patches/@op-engineering+op-sqlite+15.1.5.patch index 586def4..268c3bb 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 { @@ -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(); +@@ -68,6 +68,7 @@ public: + void on_commit(); + void on_rollback(); + void invalidate(); + void drop(); - ~DBHostObject() override; + ~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 -