@amafil/react-native-pdf-toolkit 1.0.5 → 1.0.7

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.
@@ -0,0 +1,38 @@
1
+ cmake_minimum_required(VERSION 3.13)
2
+ set(CMAKE_VERBOSE_MAKEFILE on)
3
+
4
+ add_compile_options(
5
+ -fexceptions
6
+ -frtti
7
+ -O2
8
+ -Wno-unused-parameter
9
+ )
10
+
11
+ # This file is at android/src/main/jni/; resolve the sibling build directory
12
+ # where the react-native gradle plugin writes codegen outputs.
13
+ get_filename_component(LIBRARY_ANDROID_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../.." ABSOLUTE)
14
+ set(CODEGEN_JNI "${LIBRARY_ANDROID_DIR}/build/generated/source/codegen/jni")
15
+
16
+ file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS
17
+ "${CODEGEN_JNI}/*.cpp"
18
+ "${CODEGEN_JNI}/react/renderer/components/rnpdf/*.cpp"
19
+ )
20
+
21
+ # Build as SHARED (not OBJECT) so autolinking can call target_link_libraries
22
+ # on this target from the parent CMake project scope without errors.
23
+ add_library(react_codegen_rnpdf SHARED ${react_codegen_SRCS})
24
+
25
+ target_include_directories(react_codegen_rnpdf
26
+ PUBLIC
27
+ "${CODEGEN_JNI}"
28
+ "${CODEGEN_JNI}/react/renderer/components/rnpdf"
29
+ )
30
+
31
+ find_package(ReactAndroid REQUIRED CONFIG)
32
+ find_package(fbjni REQUIRED CONFIG)
33
+
34
+ target_link_libraries(react_codegen_rnpdf
35
+ fbjni::fbjni
36
+ ReactAndroid::jsi
37
+ ReactAndroid::reactnative
38
+ )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amafil/react-native-pdf-toolkit",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "summary": "A react native PDF view component",
5
5
  "description": "A react native PDF view component, support ios and android platform",
6
6
  "main": "index.js",
@@ -55,6 +55,7 @@
55
55
  "PdfViewFlatList.js",
56
56
  "PinchZoomView.js",
57
57
  "react-native-pdf-toolkit.podspec",
58
+ "react-native.config.js",
58
59
  "fabric/"
59
60
  ],
60
61
  "codegenConfig": {
@@ -0,0 +1,11 @@
1
+ module.exports = {
2
+ dependency: {
3
+ platforms: {
4
+ android: {
5
+ sourceDir: './android',
6
+ packageImportPath: 'import org.wonday.pdf.RNPDFPackage;',
7
+ packageInstance: 'new RNPDFPackage()',
8
+ },
9
+ },
10
+ },
11
+ };