@op-engineering/op-sqlite 10.0.0-tokenizers-beta6 → 10.0.0-tokenizers-beta8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -168,14 +168,17 @@ android {
168
168
  // def tokenizerInitStrings = 0
169
169
  def tokenizersHeaderPath = 0
170
170
  if (!tokenizers.isEmpty()) {
171
- // Scan user directories for .h and .cpp files
172
171
  def sourceDir = isInsideNodeModules ? file("$rootDir/../../../c_sources") : file("$rootDir/../c_sources")
173
- sourceFiles = fileTree(dir: sourceDir, include: ["**/*.cpp", "**/*.h"])
174
- // sourceFiles = fileTree(dir: sourceDir, include: ["**/*.cpp"])
175
- .files
176
- .join(";") // Join paths with `;` for CMake
177
- tokenizersHeaderPath = isInsideNodeModules ? "../../../c_sources/tokenizers.h" : "../example/c_sources/tokenizers.h"
178
- println("tokenizers header path $tokenizersHeaderPath")
172
+ def destDir = file("$buildscript.sourceFile.parentFile/c_sources")
173
+ copy {
174
+ from sourceDir
175
+ into destDir
176
+ include "**/*.cpp", "**/*.h"
177
+ }
178
+ sourceFiles = fileTree(dir: destDir, include: ["**/*.cpp", "**/*.h"]).files.join(";")
179
+ tokenizersHeaderPath = "../c_sources/tokenizers.h"
180
+ println("tokenizers header path $tokenizersHeaderPath")
181
+
179
182
  }
180
183
 
181
184
  cppFlags "-O2", "-fexceptions", "-DONANDROID"
package/cpp/bridge.cpp CHANGED
@@ -4,14 +4,14 @@
4
4
  #include "logs.h"
5
5
  #include "utils.h"
6
6
  #include <iostream>
7
+ #include <sstream>
7
8
  #include <unordered_map>
8
9
  #include <variant>
9
- #include <sstream>
10
10
 
11
11
  #ifdef TOKENIZERS_HEADER_PATH
12
12
  #include TOKENIZERS_HEADER_PATH
13
13
  #else
14
- #define TOKENIZERS_LIST
14
+ #define TOKENIZER_LIST
15
15
  #endif
16
16
 
17
17
  namespace opsqlite {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@op-engineering/op-sqlite",
3
- "version": "10.0.0-tokenizers-beta6",
3
+ "version": "10.0.0-tokenizers-beta8",
4
4
  "description": "Next generation SQLite for React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",