Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ add_library(
${PACKAGE_NAME}
SHARED
../cpp/OPSqlite.cpp
../cpp/OPDB.cpp
../cpp/utils.cpp
../cpp/OPThreadPool.cpp
../cpp/SmartHostObject.cpp
../cpp/PreparedStatementHostObject.cpp
../cpp/DumbHostObject.cpp
../cpp/DBHostObject.cpp
cpp-adapter.cpp
)

if (USE_SQLCIPHER)
target_sources(${PACKAGE_NAME} PRIVATE ../cpp/sqlcipher/sqlite3.h ../cpp/sqlcipher/sqlite3.c ../cpp/bridge.cpp ../cpp/bridge.h)
target_sources(${PACKAGE_NAME} PRIVATE ../cpp/sqlcipher/sqlite3.h ../cpp/sqlcipher/sqlite3.c ../cpp/OPBridge.cpp ../cpp/OPBridge.hpp)

add_definitions(
-DOP_SQLITE_USE_SQLCIPHER=1
Expand All @@ -64,7 +64,7 @@ if (USE_SQLCIPHER)

find_package(openssl REQUIRED CONFIG)
elseif (USE_LIBSQL)
target_sources(${PACKAGE_NAME} PRIVATE ../cpp/libsql/bridge.cpp)
target_sources(${PACKAGE_NAME} PRIVATE ../cpp/libsql/OPBridge.cpp)

add_definitions(
-DOP_SQLITE_USE_LIBSQL=1
Expand All @@ -76,13 +76,7 @@ elseif (USE_TURSO)
-DOP_SQLITE_USE_TURSO=1
)
else()
target_sources(${PACKAGE_NAME} PRIVATE ../cpp/sqlite3.c ../cpp/bridge.cpp)
endif()

if (USE_CRSQLITE)
add_definitions(
-DOP_SQLITE_USE_CRSQLITE=1
)
target_sources(${PACKAGE_NAME} PRIVATE ../cpp/sqlite3.c ../cpp/OPBridge.cpp)
endif()

if (USE_SQLITE_VEC)
Expand Down
14 changes: 0 additions & 14 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def reactNativeArchitectures() {
def useSQLCipher = false
def useLibsql = false
def useTurso = false
def useCRSQLite = false
def performanceMode = false
def sqliteFlags = ""
def enableFTS5 = false
Expand Down Expand Up @@ -74,7 +73,6 @@ def opsqliteConfig = packageJson["op-sqlite"]
if(opsqliteConfig) {
println "[OP-SQLITE] Detected op-sqlite config from package.json at: " + packageJsonFile.absolutePath
useSQLCipher = !!opsqliteConfig["sqlcipher"]
useCRSQLite = !!opsqliteConfig["crsqlite"]
useSqliteVec = !!opsqliteConfig["sqliteVec"]
performanceMode = opsqliteConfig["performanceMode"]
sqliteFlags = opsqliteConfig["sqliteFlags"] ? opsqliteConfig["sqliteFlags"] : ""
Expand All @@ -97,10 +95,6 @@ if(useSQLCipher) {
println "[OP-SQLITE] using libsql. Report any issues to Turso"
}

if(useCRSQLite) {
println "[OP-SQLITE] using CR-SQLite"
}

if(performanceMode) {
println "[OP-SQLITE] Performance mode enabled"
}
Expand Down Expand Up @@ -171,10 +165,6 @@ android {
cFlags += "-DOP_SQLITE_USE_TURSO=1"
cppFlags += "-DOP_SQLITE_USE_TURSO=1"
}
if(useCRSQLite) {
cFlags += "-DOP_SQLITE_USE_CRSQLITE=1"
cppFlags += "-DOP_SQLITE_USE_CRSQLITE=1"
}
if(useSqliteVec) {
cFlags += "-DOP_SQLITE_USE_SQLITE_VEC=1"
cppFlags += "-DOP_SQLITE_USE_SQLITE_VEC=1"
Expand Down Expand Up @@ -202,7 +192,6 @@ android {
"-DDEFAULT_SQLITE_FLAGS='${defaultSqliteFlags.join(' ')}'",
"-DSQLITE_FLAGS='$sqliteFlags'",
"-DUSE_SQLCIPHER=${useSQLCipher ? 1 : 0}",
"-DUSE_CRSQLITE=${useCRSQLite ? 1 : 0}",
"-DUSE_LIBSQL=${useLibsql ? 1 : 0}",
"-DUSE_TURSO=${useTurso ? 1 : 0}",
"-DUSE_SQLITE_VEC=${useSqliteVec ? 1 : 0}",
Expand Down Expand Up @@ -273,9 +262,6 @@ android {
if (useTurso) {
srcDirs += 'src/main/tursoLibs'
}
if (useCRSQLite) {
srcDirs += 'src/main/libcrsqlite'
}
if (useSqliteVec) {
srcDirs += 'src/main/libsqlitevec'
}
Expand Down
2 changes: 1 addition & 1 deletion android/cpp-adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct OPSQLiteBridge : jni::JavaClass<OPSQLiteBridge> {
std::string dbPathStr = dbPath->toStdString();

opsqlite::install(*jsiRuntime, jsCallInvoker, dbPathStr.c_str(),
"libcrsqlite", "libsqlite_vec");
"libsqlite_vec");
}

static void clearStateNativeJsi(jni::alias_ref<jni::JObject> thiz) {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file removed android/src/main/libcrsqlite/x86/libcrsqlite.so
Binary file not shown.
Binary file removed android/src/main/libcrsqlite/x86_64/libcrsqlite.so
Binary file not shown.
Loading
Loading