WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
664ad70
Update react native and datetime picker
pappnu Aug 20, 2021
bf1e77e
Update async storage and camera roll
pappnu Aug 20, 2021
019a256
npm update and react-native-vector-icons
pappnu Aug 21, 2021
4af0ccf
Migrate to react-native-pager-view
pappnu Aug 21, 2021
5503f2d
Update redux-persist/-filesystem-storage
pappnu Aug 21, 2021
a85bff1
Update redux-enhancer-react-native-appstate
pappnu Aug 21, 2021
5cf9b81
Update react-native-zip-archive
pappnu Aug 21, 2021
08dbd46
Update react-native-webview
pappnu Aug 21, 2021
99070eb
Update react-native-tab-view
pappnu Aug 21, 2021
e33a4b2
Update react-native-screens
pappnu Aug 21, 2021
d91ada0
Update react-native-share
pappnu Aug 21, 2021
b0b756f
Update react-native-safe-area-context
pappnu Aug 21, 2021
6e413f2
Update react-native-progress
pappnu Aug 21, 2021
818814c
Update react-native-localize
pappnu Aug 21, 2021
5c83a1f
Update react-native-localization
pappnu Aug 21, 2021
f16ad4b
Update react-native-hyperlink
pappnu Aug 21, 2021
0acf097
Update react-native-htmlview
pappnu Aug 21, 2021
2a5007b
Update react-native-easy-toast
pappnu Aug 21, 2021
b9c24c4
Update react-native-device-info
pappnu Aug 21, 2021
4395ae7
Update formik
pappnu Aug 21, 2021
bb5832c
Update hoist-non-react-statics
pappnu Aug 21, 2021
41e4744
Update firebase dependencies
pappnu Aug 21, 2021
c0891a8
Update color
pappnu Aug 21, 2021
c70e089
Update react-navigation and switch to native stacks
pappnu Aug 21, 2021
516b1f9
Update react-native-reanimated
pappnu Aug 21, 2021
4bfb33e
Fix App NavigationContainer render conditions
pappnu Aug 22, 2021
78d10d5
Fix Detail pages scrolling on Android
pappnu Aug 22, 2021
f149fb3
Properly switch to native-stack
pappnu Aug 22, 2021
4e614a4
Revert "Update react-native-reanimated"
pappnu Aug 23, 2021
c2e7b7a
Restore App firebase analytics
pappnu Aug 23, 2021
462857b
Allow orientation in image viewer
pappnu Aug 25, 2021
409065f
Fix native stack imports
pappnu Aug 27, 2021
7c165e0
Fix search filtering
pappnu Aug 28, 2021
4e01b9d
Update react-native-reanimated
pappnu Sep 17, 2021
85f6800
npm update
pappnu Sep 17, 2021
15be1ee
npm audit fixes
pappnu Sep 17, 2021
bb194d9
Update react-native-modal-datetime-picker
pappnu Sep 17, 2021
34db82a
Update dependencies
pappnu Oct 2, 2021
ee21eac
Update to react-native 0.66.3
pappnu Dec 5, 2021
0ff86d6
Replace fetch-blob with blob-util and update dependencies
pappnu Dec 5, 2021
f78bf4e
Fix android-clean script
pappnu Dec 5, 2021
e0e3faf
Mitigate onPress firing when scrolling detail view
pappnu Dec 6, 2021
7075929
Update dependencies
pappnu Feb 4, 2022
20ce96c
Update react native to 0.67.2
pappnu Feb 4, 2022
3604573
Update react native to 0.69.1
pappnu Jul 4, 2022
0ced2b4
Fix PagerView resetting when loading more items
pappnu Jul 5, 2022
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
19 changes: 8 additions & 11 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"presets": [
"module:metro-react-native-babel-preset",
"@babel/preset-flow"
],
"plugins": [],
"presets": ["module:metro-react-native-babel-preset", "@babel/preset-flow"],
"plugins": ["react-native-reanimated/plugin"],
"env": {
"production": {
"plugins": ["react-native-paper/babel"],
"production": {
"plugins": ["react-native-paper/babel"]
}
},
},
"sourceMaps": true // must be true react-native/packager/transformer using with node-module-debug
// because of some bugs from vscode-node-debug & vscode-react-native, "sourceMaps" cannot be "inline" or "both"
}
"sourceMaps": true // must be true react-native/packager/transformer using with node-module-debug
// because of some bugs from vscode-node-debug & vscode-react-native, "sourceMaps" cannot be "inline" or "both"
}
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Windows files
[*.bat]
end_of_line = crlf
36 changes: 9 additions & 27 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,26 @@
; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*

.*/node_modules/react-native-easy-toast
.*/node_modules/react-static-container
.*/node_modules/react-navigation

; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/warning')
node_modules/warning/.*
; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js

.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$

[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]
./src

[libs]
node_modules/react-native/interface.js
node_modules/react-native/flow
node_modules/react-native/flow-github/
flow/
flow-typed
node_modules/react-native/flow/

[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable
exact_by_default=true

format.bracket_spacing=false

module.file_ext=.js
module.file_ext=.json
Expand All @@ -45,21 +38,11 @@ munge_underscores=true
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState


suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
Expand All @@ -69,8 +52,7 @@ nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error

[strict]
deprecated-type
nonstrict-import
Expand All @@ -81,4 +63,4 @@ untyped-import
untyped-type-import

[version]
^0.122.0
^0.176.3
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.pbxproj -text
# specific for windows script files
# Windows files should use crlf line endings
# https://help.github.com/articles/dealing-with-line-endings/
*.bat text eol=crlf
19 changes: 11 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local

# Android/IntelliJ
#
Expand All @@ -28,6 +29,7 @@ build/
.gradle
local.properties
*.iml
*.hprof
/android/.settings/
google-services.json

Expand All @@ -51,17 +53,18 @@ buck-out/
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

coverage

.vscode
flow-typed
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# CocoaPods
# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/

GoogleService-Info.plist
.vscode
flow-typed
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.5
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.5'

gem 'cocoapods', '~> 1.11', '>= 1.11.2'
138 changes: 119 additions & 19 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply plugin: "com.android.application"
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.firebase.firebase-perf'
Expand Down Expand Up @@ -81,7 +81,7 @@ import com.android.build.OutputFile
*/

project.ext.react = [
enableHermes: false, // clean and rebuild if changing
enableHermes: true, // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"
Expand Down Expand Up @@ -112,32 +112,105 @@ def jscFlavor = 'org.webkit:android-jsc:+'
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
def enableProguardInReleaseBuilds = true

/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and mirrored here. If it is not set
* This should be set on project.ext.react and that value will be read here. If it is not set
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", true);

/**
* Architectures to build native code for.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
applicationId "com.utopia.pxviewr"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 401
versionName "5.0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-21",
"APP_STL=c++_shared",
"NDK_TOOLCHAIN_VERSION=clang",
"GENERATED_SRC_DIR=$buildDir/generated/source",
"PROJECT_BUILD_DIR=$buildDir",
"REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
"REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
"NODE_MODULES_DIR=$rootDir/../node_modules"
cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
cppFlags "-std=c++17"
// Make sure this target name is the same you specify inside the
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
targets "pxviewr_appmodules"
}
}
if (!enableSeparateBuildPerCPUArchitecture) {
ndk {
abiFilters (*reactNativeArchitectures())
}
}
}
}

if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
ndkBuild {
path "$projectDir/src/main/jni/Android.mk"
}
}
def reactAndroidProjectDir = project(':ReactAndroid').projectDir
def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
afterEvaluate {
// If you wish to add a custom TurboModule or component locally,
// you should uncomment this line.
// preBuild.dependsOn("generateCodegenArtifactsFromSchema")
preDebugBuild.dependsOn(packageReactNdkDebugLibs)
preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)

// Due to a bug inside AGP, we have to explicitly set a dependency
// between configureNdkBuild* tasks and the preBuild tasks.
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
configureNdkBuildRelease.dependsOn(preReleaseBuild)
configureNdkBuildDebug.dependsOn(preDebugBuild)
reactNativeArchitectures().each { architecture ->
tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
dependsOn("preDebugBuild")
}
tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
dependsOn("preReleaseBuild")
}
}
}
}

signingConfigs {
release {
if (project.hasProperty('PXVIEWR_RELEASE_STORE_FILE')) {
Expand All @@ -153,10 +226,13 @@ android {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
include (*reactNativeArchitectures())
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
release {
Expand All @@ -171,11 +247,12 @@ android {
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}
}
}
Expand All @@ -189,9 +266,7 @@ repositories {
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

dependencies {
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'

implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
Expand All @@ -206,7 +281,7 @@ dependencies {

implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
Expand All @@ -217,18 +292,35 @@ dependencies {
}

if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
//noinspection GradleDynamicVersion
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
exclude group:'com.facebook.fbjni'
}
} else {
implementation jscFlavor
}
}

if (isNewArchitectureEnabled()) {
// If new architecture is enabled, we let you build RN from source
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
// This will be applied to all the imported transtitive dependency.
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("com.facebook.react:react-native"))
.using(project(":ReactAndroid"))
.because("On New Architecture we're building React Native from source")
substitute(module("com.facebook.react:hermes-engine"))
.using(project(":ReactAndroid:hermes-engine"))
.because("On New Architecture we're building Hermes from source")
}
}
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
from configurations.implementation
into 'libs'
}

Expand All @@ -245,3 +337,11 @@ task copyDownloadableDepsToLibs(type: Copy) {
// }

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

def isNewArchitectureEnabled() {
// To opt-in for the New Architecture, you can either:
// - Set `newArchEnabled` to true inside the `gradle.properties` file
// - Invoke gradle with `-newArchEnabled=true`
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}
Loading