react-native-pdf 6.3.0 → 6.6.0
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.
- package/README.md +59 -69
- package/android/.gradle/5.6.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/5.6.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/5.6.1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +3 -3
- package/android/src/main/java/org/wonday/pdf/PdfView.java +21 -2
- package/ios/RCTPdf/PdfManager.m +11 -1
- package/ios/RCTPdf/RCTPdfView.h +2 -0
- package/ios/RCTPdf/RCTPdfView.m +21 -5
- package/ios/RCTPdf/RCTPdfViewManager.m +1 -1
- package/ios/RCTPdf.xcodeproj/xcuserdata/wonday.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/package.json +18 -6
- package/windows/RCTPdf/RCTPdfControl.xaml +0 -1
- package/windows/README.md +4 -8
- package/.babelrc +0 -3
- package/.github/workflows/windows-ci.yml +0 -39
- package/DoubleTapView.js +0 -126
- package/PdfManager.js +0 -31
- package/PdfPageView.js +0 -54
- package/PdfView.js +0 -416
- package/PdfViewFlatList.js +0 -31
- package/PinchZoomView.js +0 -126
- package/example/.eslintrc.js +0 -4
- package/example/PDFExample.js +0 -180
- package/example/__windows_tests__/TestPDF.js +0 -43
- package/example/android/app/BUCK +0 -55
- package/example/android/app/build.gradle +0 -210
- package/example/android/app/build_defs.bzl +0 -19
- package/example/android/app/proguard-rules.pro +0 -10
- package/example/android/app/src/debug/AndroidManifest.xml +0 -8
- package/example/android/app/src/main/AndroidManifest.xml +0 -26
- package/example/android/app/src/main/assets/test.pdf +0 -0
- package/example/android/app/src/main/java/com/pdfexample/MainActivity.java +0 -15
- package/example/android/app/src/main/java/com/pdfexample/MainApplication.java +0 -49
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +0 -3
- package/example/android/app/src/main/res/values/styles.xml +0 -9
- package/example/android/build.gradle +0 -38
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/example/android/gradle.properties +0 -21
- package/example/android/gradlew +0 -188
- package/example/android/gradlew.bat +0 -100
- package/example/android/settings.gradle +0 -3
- package/example/app.json +0 -4
- package/example/babel.config.js +0 -3
- package/example/index.js +0 -9
- package/example/ios/PDFExample/AppDelegate.h +0 -15
- package/example/ios/PDFExample/AppDelegate.m +0 -42
- package/example/ios/PDFExample/Base.lproj/LaunchScreen.xib +0 -42
- package/example/ios/PDFExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
- package/example/ios/PDFExample/Images.xcassets/Contents.json +0 -6
- package/example/ios/PDFExample/Info.plist +0 -57
- package/example/ios/PDFExample/main.m +0 -16
- package/example/ios/PDFExample-tvOS/Info.plist +0 -53
- package/example/ios/PDFExample-tvOSTests/Info.plist +0 -24
- package/example/ios/PDFExample.xcodeproj/project.pbxproj +0 -923
- package/example/ios/PDFExample.xcodeproj/xcshareddata/xcschemes/PDFExample-tvOS.xcscheme +0 -129
- package/example/ios/PDFExample.xcodeproj/xcshareddata/xcschemes/PDFExample.xcscheme +0 -129
- package/example/ios/PDFExample.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/ios/PDFExampleTests/Info.plist +0 -24
- package/example/ios/PDFExampleTests/PDFExampleTests.m +0 -68
- package/example/ios/Podfile +0 -47
- package/example/ios/Podfile.lock +0 -205
- package/example/jest-windows/driver.setup.js +0 -12
- package/example/jest-windows/jest.setup.js +0 -1
- package/example/jest.windows.config.js +0 -4
- package/example/metro.config.js +0 -29
- package/example/package.json +0 -48
- package/example/test.pdf +0 -0
- package/example/windows/PDFExample/App.cpp +0 -80
- package/example/windows/PDFExample/App.h +0 -20
- package/example/windows/PDFExample/App.idl +0 -3
- package/example/windows/PDFExample/App.xaml +0 -10
- package/example/windows/PDFExample/Assets/LockScreenLogo.scale-200.png +0 -0
- package/example/windows/PDFExample/Assets/SplashScreen.scale-200.png +0 -0
- package/example/windows/PDFExample/Assets/Square150x150Logo.scale-200.png +0 -0
- package/example/windows/PDFExample/Assets/Square44x44Logo.scale-200.png +0 -0
- package/example/windows/PDFExample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png +0 -0
- package/example/windows/PDFExample/Assets/StoreLogo.png +0 -0
- package/example/windows/PDFExample/Assets/Wide310x150Logo.scale-200.png +0 -0
- package/example/windows/PDFExample/AutolinkedNativeModules.g.cpp +0 -18
- package/example/windows/PDFExample/AutolinkedNativeModules.g.h +0 -10
- package/example/windows/PDFExample/AutolinkedNativeModules.g.props +0 -6
- package/example/windows/PDFExample/AutolinkedNativeModules.g.targets +0 -10
- package/example/windows/PDFExample/MainPage.cpp +0 -24
- package/example/windows/PDFExample/MainPage.h +0 -21
- package/example/windows/PDFExample/MainPage.idl +0 -8
- package/example/windows/PDFExample/MainPage.xaml +0 -16
- package/example/windows/PDFExample/PDFExample.vcxproj +0 -205
- package/example/windows/PDFExample/PDFExample.vcxproj.filters +0 -64
- package/example/windows/PDFExample/PDFExample_TemporaryKey.pfx +0 -0
- package/example/windows/PDFExample/Package.appxmanifest +0 -52
- package/example/windows/PDFExample/PropertySheet.props +0 -16
- package/example/windows/PDFExample/ReactPackageProvider.cpp +0 -18
- package/example/windows/PDFExample/ReactPackageProvider.h +0 -15
- package/example/windows/PDFExample/packages.config +0 -5
- package/example/windows/PDFExample/pch.cpp +0 -1
- package/example/windows/PDFExample/pch.h +0 -29
- package/example/windows/PDFExample.sln +0 -264
- package/index.d.ts +0 -51
- package/index.js +0 -493
- package/index.js.flow +0 -63
- package/issue_template.md +0 -13
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
apply plugin: "com.android.application"
|
|
2
|
-
|
|
3
|
-
import com.android.build.OutputFile
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
|
|
7
|
-
* and bundleReleaseJsAndAssets).
|
|
8
|
-
* These basically call `react-native bundle` with the correct arguments during the Android build
|
|
9
|
-
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
|
|
10
|
-
* bundle directly from the development server. Below you can see all the possible configurations
|
|
11
|
-
* and their defaults. If you decide to add a configuration block, make sure to add it before the
|
|
12
|
-
* `apply from: "../../node_modules/react-native/react.gradle"` line.
|
|
13
|
-
*
|
|
14
|
-
* project.ext.react = [
|
|
15
|
-
* // the name of the generated asset file containing your JS bundle
|
|
16
|
-
* bundleAssetName: "index.android.bundle",
|
|
17
|
-
*
|
|
18
|
-
* // the entry file for bundle generation
|
|
19
|
-
* entryFile: "index.android.js",
|
|
20
|
-
*
|
|
21
|
-
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
|
|
22
|
-
* bundleCommand: "ram-bundle",
|
|
23
|
-
*
|
|
24
|
-
* // whether to bundle JS and assets in debug mode
|
|
25
|
-
* bundleInDebug: false,
|
|
26
|
-
*
|
|
27
|
-
* // whether to bundle JS and assets in release mode
|
|
28
|
-
* bundleInRelease: true,
|
|
29
|
-
*
|
|
30
|
-
* // whether to bundle JS and assets in another build variant (if configured).
|
|
31
|
-
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
|
|
32
|
-
* // The configuration property can be in the following formats
|
|
33
|
-
* // 'bundleIn${productFlavor}${buildType}'
|
|
34
|
-
* // 'bundleIn${buildType}'
|
|
35
|
-
* // bundleInFreeDebug: true,
|
|
36
|
-
* // bundleInPaidRelease: true,
|
|
37
|
-
* // bundleInBeta: true,
|
|
38
|
-
*
|
|
39
|
-
* // whether to disable dev mode in custom build variants (by default only disabled in release)
|
|
40
|
-
* // for example: to disable dev mode in the staging build type (if configured)
|
|
41
|
-
* devDisabledInStaging: true,
|
|
42
|
-
* // The configuration property can be in the following formats
|
|
43
|
-
* // 'devDisabledIn${productFlavor}${buildType}'
|
|
44
|
-
* // 'devDisabledIn${buildType}'
|
|
45
|
-
*
|
|
46
|
-
* // the root of your project, i.e. where "package.json" lives
|
|
47
|
-
* root: "../../",
|
|
48
|
-
*
|
|
49
|
-
* // where to put the JS bundle asset in debug mode
|
|
50
|
-
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
|
|
51
|
-
*
|
|
52
|
-
* // where to put the JS bundle asset in release mode
|
|
53
|
-
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
|
|
54
|
-
*
|
|
55
|
-
* // where to put drawable resources / React Native assets, e.g. the ones you use via
|
|
56
|
-
* // require('./image.png')), in debug mode
|
|
57
|
-
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
|
|
58
|
-
*
|
|
59
|
-
* // where to put drawable resources / React Native assets, e.g. the ones you use via
|
|
60
|
-
* // require('./image.png')), in release mode
|
|
61
|
-
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
|
|
62
|
-
*
|
|
63
|
-
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
|
|
64
|
-
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
|
|
65
|
-
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
|
|
66
|
-
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
|
|
67
|
-
* // for example, you might want to remove it from here.
|
|
68
|
-
* inputExcludes: ["android/**", "ios/**"],
|
|
69
|
-
*
|
|
70
|
-
* // override which node gets called and with what additional arguments
|
|
71
|
-
* nodeExecutableAndArgs: ["node"],
|
|
72
|
-
*
|
|
73
|
-
* // supply additional arguments to the packager
|
|
74
|
-
* extraPackagerArgs: []
|
|
75
|
-
* ]
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
project.ext.react = [
|
|
79
|
-
entryFile: "index.js",
|
|
80
|
-
enableHermes: false, // clean and rebuild if changing
|
|
81
|
-
]
|
|
82
|
-
|
|
83
|
-
apply from: "../../node_modules/react-native/react.gradle"
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Set this to true to create two separate APKs instead of one:
|
|
87
|
-
* - An APK that only works on ARM devices
|
|
88
|
-
* - An APK that only works on x86 devices
|
|
89
|
-
* The advantage is the size of the APK is reduced by about 4MB.
|
|
90
|
-
* Upload all the APKs to the Play Store and people will download
|
|
91
|
-
* the correct one based on the CPU architecture of their device.
|
|
92
|
-
*/
|
|
93
|
-
def enableSeparateBuildPerCPUArchitecture = false
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Run Proguard to shrink the Java bytecode in release builds.
|
|
97
|
-
*/
|
|
98
|
-
def enableProguardInReleaseBuilds = false
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* The preferred build flavor of JavaScriptCore.
|
|
102
|
-
*
|
|
103
|
-
* For example, to use the international variant, you can use:
|
|
104
|
-
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
|
105
|
-
*
|
|
106
|
-
* The international variant includes ICU i18n library and necessary data
|
|
107
|
-
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
|
108
|
-
* give correct results when using with locales other than en-US. Note that
|
|
109
|
-
* this variant is about 6MiB larger per architecture than default.
|
|
110
|
-
*/
|
|
111
|
-
def jscFlavor = 'org.webkit:android-jsc:+'
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Whether to enable the Hermes VM.
|
|
115
|
-
*
|
|
116
|
-
* This should be set on project.ext.react and mirrored here. If it is not set
|
|
117
|
-
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
|
|
118
|
-
* and the benefits of using Hermes will therefore be sharply reduced.
|
|
119
|
-
*/
|
|
120
|
-
def enableHermes = project.ext.react.get("enableHermes", false);
|
|
121
|
-
|
|
122
|
-
android {
|
|
123
|
-
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
124
|
-
|
|
125
|
-
compileOptions {
|
|
126
|
-
sourceCompatibility JavaVersion.VERSION_1_8
|
|
127
|
-
targetCompatibility JavaVersion.VERSION_1_8
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
defaultConfig {
|
|
131
|
-
applicationId "com.pdfexample"
|
|
132
|
-
minSdkVersion rootProject.ext.minSdkVersion
|
|
133
|
-
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
134
|
-
versionCode 1
|
|
135
|
-
versionName "1.0"
|
|
136
|
-
}
|
|
137
|
-
splits {
|
|
138
|
-
abi {
|
|
139
|
-
reset()
|
|
140
|
-
enable enableSeparateBuildPerCPUArchitecture
|
|
141
|
-
universalApk false // If true, also generate a universal APK
|
|
142
|
-
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
signingConfigs {
|
|
146
|
-
debug {
|
|
147
|
-
storeFile file('debug.keystore')
|
|
148
|
-
storePassword 'android'
|
|
149
|
-
keyAlias 'androiddebugkey'
|
|
150
|
-
keyPassword 'android'
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
buildTypes {
|
|
154
|
-
debug {
|
|
155
|
-
signingConfig signingConfigs.debug
|
|
156
|
-
}
|
|
157
|
-
release {
|
|
158
|
-
// Caution! In production, you need to generate your own keystore file.
|
|
159
|
-
// see https://facebook.github.io/react-native/docs/signed-apk-android.
|
|
160
|
-
signingConfig signingConfigs.debug
|
|
161
|
-
minifyEnabled enableProguardInReleaseBuilds
|
|
162
|
-
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
// applicationVariants are e.g. debug, release
|
|
166
|
-
applicationVariants.all { variant ->
|
|
167
|
-
variant.outputs.each { output ->
|
|
168
|
-
// For each separate APK per architecture, set a unique version code as described here:
|
|
169
|
-
// https://developer.android.com/studio/build/configure-apk-splits.html
|
|
170
|
-
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
|
|
171
|
-
def abi = output.getFilter(OutputFile.ABI)
|
|
172
|
-
if (abi != null) { // null for the universal-debug, universal-release variants
|
|
173
|
-
output.versionCodeOverride =
|
|
174
|
-
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
packagingOptions {
|
|
181
|
-
pickFirst '**/armeabi-v7a/libc++_shared.so'
|
|
182
|
-
pickFirst '**/x86/libc++_shared.so'
|
|
183
|
-
pickFirst '**/arm64-v8a/libc++_shared.so'
|
|
184
|
-
pickFirst '**/x86_64/libc++_shared.so'
|
|
185
|
-
pickFirst '**/x86/libjsc.so'
|
|
186
|
-
pickFirst '**/armeabi-v7a/libjsc.so'
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
dependencies {
|
|
191
|
-
implementation fileTree(dir: "libs", include: ["*.jar"])
|
|
192
|
-
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
193
|
-
|
|
194
|
-
if (enableHermes) {
|
|
195
|
-
def hermesPath = "../../node_modules/hermesvm/android/";
|
|
196
|
-
debugImplementation files(hermesPath + "hermes-debug.aar")
|
|
197
|
-
releaseImplementation files(hermesPath + "hermes-release.aar")
|
|
198
|
-
} else {
|
|
199
|
-
implementation jscFlavor
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Run this once to be able to run the application with BUCK
|
|
204
|
-
// puts all compile dependencies into folder libs for BUCK to use
|
|
205
|
-
task copyDownloadableDepsToLibs(type: Copy) {
|
|
206
|
-
from configurations.compile
|
|
207
|
-
into 'libs'
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"""Helper definitions to glob .aar and .jar targets"""
|
|
2
|
-
|
|
3
|
-
def create_aar_targets(aarfiles):
|
|
4
|
-
for aarfile in aarfiles:
|
|
5
|
-
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
|
|
6
|
-
lib_deps.append(":" + name)
|
|
7
|
-
android_prebuilt_aar(
|
|
8
|
-
name = name,
|
|
9
|
-
aar = aarfile,
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
def create_jar_targets(jarfiles):
|
|
13
|
-
for jarfile in jarfiles:
|
|
14
|
-
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
|
|
15
|
-
lib_deps.append(":" + name)
|
|
16
|
-
prebuilt_jar(
|
|
17
|
-
name = name,
|
|
18
|
-
binary_jar = jarfile,
|
|
19
|
-
)
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Add project specific ProGuard rules here.
|
|
2
|
-
# By default, the flags in this file are appended to flags specified
|
|
3
|
-
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
|
|
4
|
-
# You can edit the include path and order by changing the proguardFiles
|
|
5
|
-
# directive in build.gradle.
|
|
6
|
-
#
|
|
7
|
-
# For more details, see
|
|
8
|
-
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
9
|
-
|
|
10
|
-
# Add any project specific keep options here:
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
-
xmlns:tools="http://schemas.android.com/tools">
|
|
4
|
-
|
|
5
|
-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
|
6
|
-
|
|
7
|
-
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
|
|
8
|
-
</manifest>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
-
package="com.pdfexample">
|
|
3
|
-
|
|
4
|
-
<uses-permission android:name="android.permission.INTERNET" />
|
|
5
|
-
|
|
6
|
-
<application
|
|
7
|
-
android:name=".MainApplication"
|
|
8
|
-
android:label="@string/app_name"
|
|
9
|
-
android:icon="@mipmap/ic_launcher"
|
|
10
|
-
android:roundIcon="@mipmap/ic_launcher_round"
|
|
11
|
-
android:allowBackup="false"
|
|
12
|
-
android:theme="@style/AppTheme">
|
|
13
|
-
<activity
|
|
14
|
-
android:name=".MainActivity"
|
|
15
|
-
android:label="@string/app_name"
|
|
16
|
-
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
|
17
|
-
android:windowSoftInputMode="adjustResize">
|
|
18
|
-
<intent-filter>
|
|
19
|
-
<action android:name="android.intent.action.MAIN" />
|
|
20
|
-
<category android:name="android.intent.category.LAUNCHER" />
|
|
21
|
-
</intent-filter>
|
|
22
|
-
</activity>
|
|
23
|
-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
|
|
24
|
-
</application>
|
|
25
|
-
|
|
26
|
-
</manifest>
|
|
Binary file
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
package com.pdfexample;
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.ReactActivity;
|
|
4
|
-
|
|
5
|
-
public class MainActivity extends ReactActivity {
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Returns the name of the main component registered from JavaScript.
|
|
9
|
-
* This is used to schedule rendering of the component.
|
|
10
|
-
*/
|
|
11
|
-
@Override
|
|
12
|
-
protected String getMainComponentName() {
|
|
13
|
-
return "PDFExample";
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
package com.pdfexample;
|
|
2
|
-
|
|
3
|
-
import android.app.Application;
|
|
4
|
-
import android.util.Log;
|
|
5
|
-
|
|
6
|
-
import com.facebook.react.PackageList;
|
|
7
|
-
import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
|
|
8
|
-
import com.facebook.react.bridge.JavaScriptExecutorFactory;
|
|
9
|
-
import com.facebook.react.ReactApplication;
|
|
10
|
-
import com.facebook.react.ReactNativeHost;
|
|
11
|
-
import com.facebook.react.ReactPackage;
|
|
12
|
-
import com.facebook.soloader.SoLoader;
|
|
13
|
-
|
|
14
|
-
import java.util.List;
|
|
15
|
-
|
|
16
|
-
public class MainApplication extends Application implements ReactApplication {
|
|
17
|
-
|
|
18
|
-
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
|
|
19
|
-
@Override
|
|
20
|
-
public boolean getUseDeveloperSupport() {
|
|
21
|
-
return BuildConfig.DEBUG;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@Override
|
|
25
|
-
protected List<ReactPackage> getPackages() {
|
|
26
|
-
@SuppressWarnings("UnnecessaryLocalVariable")
|
|
27
|
-
List<ReactPackage> packages = new PackageList(this).getPackages();
|
|
28
|
-
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
29
|
-
// packages.add(new MyReactNativePackage());
|
|
30
|
-
return packages;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@Override
|
|
34
|
-
protected String getJSMainModuleName() {
|
|
35
|
-
return "index";
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
@Override
|
|
40
|
-
public ReactNativeHost getReactNativeHost() {
|
|
41
|
-
return mReactNativeHost;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@Override
|
|
45
|
-
public void onCreate() {
|
|
46
|
-
super.onCreate();
|
|
47
|
-
SoLoader.init(this, /* native exopackage */ false);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
2
|
-
|
|
3
|
-
buildscript {
|
|
4
|
-
ext {
|
|
5
|
-
buildToolsVersion = "28.0.3"
|
|
6
|
-
minSdkVersion = 16
|
|
7
|
-
compileSdkVersion = 28
|
|
8
|
-
targetSdkVersion = 28
|
|
9
|
-
supportLibVersion = "28.0.0"
|
|
10
|
-
}
|
|
11
|
-
repositories {
|
|
12
|
-
google()
|
|
13
|
-
jcenter()
|
|
14
|
-
}
|
|
15
|
-
dependencies {
|
|
16
|
-
classpath("com.android.tools.build:gradle:3.4.1")
|
|
17
|
-
|
|
18
|
-
// NOTE: Do not place your application dependencies here; they belong
|
|
19
|
-
// in the individual module build.gradle files
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
allprojects {
|
|
24
|
-
repositories {
|
|
25
|
-
mavenLocal()
|
|
26
|
-
maven {
|
|
27
|
-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
28
|
-
url("$rootDir/../node_modules/react-native/android")
|
|
29
|
-
}
|
|
30
|
-
maven {
|
|
31
|
-
// Android JSC is installed from npm
|
|
32
|
-
url("$rootDir/../node_modules/jsc-android/dist")
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
google()
|
|
36
|
-
jcenter()
|
|
37
|
-
}
|
|
38
|
-
}
|
|
Binary file
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Project-wide Gradle settings.
|
|
2
|
-
|
|
3
|
-
# IDE (e.g. Android Studio) users:
|
|
4
|
-
# Gradle settings configured through the IDE *will override*
|
|
5
|
-
# any settings specified in this file.
|
|
6
|
-
|
|
7
|
-
# For more details on how to configure your build environment visit
|
|
8
|
-
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
9
|
-
|
|
10
|
-
# Specifies the JVM arguments used for the daemon process.
|
|
11
|
-
# The setting is particularly useful for tweaking memory settings.
|
|
12
|
-
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
|
13
|
-
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
|
14
|
-
|
|
15
|
-
# When configured, Gradle will run in incubating parallel mode.
|
|
16
|
-
# This option should only be used with decoupled projects. More details, visit
|
|
17
|
-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
18
|
-
# org.gradle.parallel=true
|
|
19
|
-
|
|
20
|
-
android.useAndroidX=true
|
|
21
|
-
android.enableJetifier=true
|
package/example/android/gradlew
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
|
|
3
|
-
#
|
|
4
|
-
# Copyright 2015 the original author or authors.
|
|
5
|
-
#
|
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
# you may not use this file except in compliance with the License.
|
|
8
|
-
# You may obtain a copy of the License at
|
|
9
|
-
#
|
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
#
|
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
# See the License for the specific language governing permissions and
|
|
16
|
-
# limitations under the License.
|
|
17
|
-
#
|
|
18
|
-
|
|
19
|
-
##############################################################################
|
|
20
|
-
##
|
|
21
|
-
## Gradle start up script for UN*X
|
|
22
|
-
##
|
|
23
|
-
##############################################################################
|
|
24
|
-
|
|
25
|
-
# Attempt to set APP_HOME
|
|
26
|
-
# Resolve links: $0 may be a link
|
|
27
|
-
PRG="$0"
|
|
28
|
-
# Need this for relative symlinks.
|
|
29
|
-
while [ -h "$PRG" ] ; do
|
|
30
|
-
ls=`ls -ld "$PRG"`
|
|
31
|
-
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
32
|
-
if expr "$link" : '/.*' > /dev/null; then
|
|
33
|
-
PRG="$link"
|
|
34
|
-
else
|
|
35
|
-
PRG=`dirname "$PRG"`"/$link"
|
|
36
|
-
fi
|
|
37
|
-
done
|
|
38
|
-
SAVED="`pwd`"
|
|
39
|
-
cd "`dirname \"$PRG\"`/" >/dev/null
|
|
40
|
-
APP_HOME="`pwd -P`"
|
|
41
|
-
cd "$SAVED" >/dev/null
|
|
42
|
-
|
|
43
|
-
APP_NAME="Gradle"
|
|
44
|
-
APP_BASE_NAME=`basename "$0"`
|
|
45
|
-
|
|
46
|
-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
47
|
-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
48
|
-
|
|
49
|
-
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
50
|
-
MAX_FD="maximum"
|
|
51
|
-
|
|
52
|
-
warn () {
|
|
53
|
-
echo "$*"
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
die () {
|
|
57
|
-
echo
|
|
58
|
-
echo "$*"
|
|
59
|
-
echo
|
|
60
|
-
exit 1
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
# OS specific support (must be 'true' or 'false').
|
|
64
|
-
cygwin=false
|
|
65
|
-
msys=false
|
|
66
|
-
darwin=false
|
|
67
|
-
nonstop=false
|
|
68
|
-
case "`uname`" in
|
|
69
|
-
CYGWIN* )
|
|
70
|
-
cygwin=true
|
|
71
|
-
;;
|
|
72
|
-
Darwin* )
|
|
73
|
-
darwin=true
|
|
74
|
-
;;
|
|
75
|
-
MINGW* )
|
|
76
|
-
msys=true
|
|
77
|
-
;;
|
|
78
|
-
NONSTOP* )
|
|
79
|
-
nonstop=true
|
|
80
|
-
;;
|
|
81
|
-
esac
|
|
82
|
-
|
|
83
|
-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|
84
|
-
|
|
85
|
-
# Determine the Java command to use to start the JVM.
|
|
86
|
-
if [ -n "$JAVA_HOME" ] ; then
|
|
87
|
-
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
88
|
-
# IBM's JDK on AIX uses strange locations for the executables
|
|
89
|
-
JAVACMD="$JAVA_HOME/jre/sh/java"
|
|
90
|
-
else
|
|
91
|
-
JAVACMD="$JAVA_HOME/bin/java"
|
|
92
|
-
fi
|
|
93
|
-
if [ ! -x "$JAVACMD" ] ; then
|
|
94
|
-
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
95
|
-
|
|
96
|
-
Please set the JAVA_HOME variable in your environment to match the
|
|
97
|
-
location of your Java installation."
|
|
98
|
-
fi
|
|
99
|
-
else
|
|
100
|
-
JAVACMD="java"
|
|
101
|
-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
102
|
-
|
|
103
|
-
Please set the JAVA_HOME variable in your environment to match the
|
|
104
|
-
location of your Java installation."
|
|
105
|
-
fi
|
|
106
|
-
|
|
107
|
-
# Increase the maximum file descriptors if we can.
|
|
108
|
-
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
|
109
|
-
MAX_FD_LIMIT=`ulimit -H -n`
|
|
110
|
-
if [ $? -eq 0 ] ; then
|
|
111
|
-
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
|
112
|
-
MAX_FD="$MAX_FD_LIMIT"
|
|
113
|
-
fi
|
|
114
|
-
ulimit -n $MAX_FD
|
|
115
|
-
if [ $? -ne 0 ] ; then
|
|
116
|
-
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
|
117
|
-
fi
|
|
118
|
-
else
|
|
119
|
-
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
|
120
|
-
fi
|
|
121
|
-
fi
|
|
122
|
-
|
|
123
|
-
# For Darwin, add options to specify how the application appears in the dock
|
|
124
|
-
if $darwin; then
|
|
125
|
-
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
|
126
|
-
fi
|
|
127
|
-
|
|
128
|
-
# For Cygwin, switch paths to Windows format before running java
|
|
129
|
-
if $cygwin ; then
|
|
130
|
-
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
|
131
|
-
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
|
132
|
-
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
133
|
-
|
|
134
|
-
# We build the pattern for arguments to be converted via cygpath
|
|
135
|
-
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
136
|
-
SEP=""
|
|
137
|
-
for dir in $ROOTDIRSRAW ; do
|
|
138
|
-
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
|
139
|
-
SEP="|"
|
|
140
|
-
done
|
|
141
|
-
OURCYGPATTERN="(^($ROOTDIRS))"
|
|
142
|
-
# Add a user-defined pattern to the cygpath arguments
|
|
143
|
-
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
|
144
|
-
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
|
145
|
-
fi
|
|
146
|
-
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
147
|
-
i=0
|
|
148
|
-
for arg in "$@" ; do
|
|
149
|
-
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
|
150
|
-
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
|
151
|
-
|
|
152
|
-
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
|
153
|
-
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
|
154
|
-
else
|
|
155
|
-
eval `echo args$i`="\"$arg\""
|
|
156
|
-
fi
|
|
157
|
-
i=$((i+1))
|
|
158
|
-
done
|
|
159
|
-
case $i in
|
|
160
|
-
(0) set -- ;;
|
|
161
|
-
(1) set -- "$args0" ;;
|
|
162
|
-
(2) set -- "$args0" "$args1" ;;
|
|
163
|
-
(3) set -- "$args0" "$args1" "$args2" ;;
|
|
164
|
-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
|
165
|
-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
|
166
|
-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
|
167
|
-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
|
168
|
-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
|
169
|
-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
|
170
|
-
esac
|
|
171
|
-
fi
|
|
172
|
-
|
|
173
|
-
# Escape application args
|
|
174
|
-
save () {
|
|
175
|
-
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
|
176
|
-
echo " "
|
|
177
|
-
}
|
|
178
|
-
APP_ARGS=$(save "$@")
|
|
179
|
-
|
|
180
|
-
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
|
181
|
-
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
|
182
|
-
|
|
183
|
-
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
|
184
|
-
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
|
185
|
-
cd "$(dirname "$0")"
|
|
186
|
-
fi
|
|
187
|
-
|
|
188
|
-
exec "$JAVACMD" "$@"
|