| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,7 @@ | |||
| 1 | 1 | module.exports = { | |
| 2 | 2 | root: true, | |
| 3 | 3 | extends: '@react-native-community', | |
| 4 | + rules: { | ||
| 5 | + 'react-hooks/exhaustive-deps': 0, | ||
| 6 | + }, | ||
| 4 | 7 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,10 +8,6 @@ | |||
| 8 | 8 | ; Ignore polyfills | |
| 9 | 9 | node_modules/react-native/Libraries/polyfills/.* | |
| 10 | 10 | ||
| 11 | - ; These should not be required directly | ||
| 12 | - ; require from fbjs/lib instead: require('fbjs/lib/warning') | ||
| 13 | - node_modules/warning/.* | ||
| 14 | - | ||
| 15 | 11 | ; Flow doesn't support platforms | |
| 16 | 12 | .*/Libraries/Utilities/LoadingView.js | |
| 17 | 13 | ||
@@ -27,8 +23,9 @@ node_modules/react-native/flow/ | |||
| 27 | 23 | [options] | |
| 28 | 24 | emoji=true | |
| 29 | 25 | ||
| 30 | - esproposal.optional_chaining=enable | ||
| 31 | - esproposal.nullish_coalescing=enable | ||
| 26 | + exact_by_default=true | ||
| 27 | + | ||
| 28 | + format.bracket_spacing=false | ||
| 32 | 29 | ||
| 33 | 30 | module.file_ext=.js | |
| 34 | 31 | module.file_ext=.json | |
@@ -44,10 +41,6 @@ suppress_type=$FlowFixMe | |||
| 44 | 41 | suppress_type=$FlowFixMeProps | |
| 45 | 42 | suppress_type=$FlowFixMeState | |
| 46 | 43 | ||
| 47 | - suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) | ||
| 48 | - suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ | ||
| 49 | - suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError | ||
| 50 | - | ||
| 51 | 44 | [lints] | |
| 52 | 45 | sketchy-null-number=warn | |
| 53 | 46 | sketchy-null-mixed=warn | |
@@ -56,10 +49,8 @@ untyped-type-import=warn | |||
| 56 | 49 | nonstrict-import=warn | |
| 57 | 50 | deprecated-type=warn | |
| 58 | 51 | unsafe-getters-setters=warn | |
| 59 | - inexact-spread=warn | ||
| 60 | 52 | unnecessary-invariant=warn | |
| 61 | 53 | signature-verification-failure=warn | |
| 62 | - deprecated-utility=error | ||
| 63 | 54 | ||
| 64 | 55 | [strict] | |
| 65 | 56 | deprecated-type | |
@@ -71,4 +62,4 @@ untyped-import | |||
| 71 | 62 | untyped-type-import | |
| 72 | 63 | ||
| 73 | 64 | [version] | |
| 74 | - ^0.113.0 | ||
| 65 | + ^0.162.0 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,6 +28,7 @@ build/ | |||
| 28 | 28 | .gradle | |
| 29 | 29 | local.properties | |
| 30 | 30 | *.iml | |
| 31 | + *.hprof | ||
| 31 | 32 | ||
| 32 | 33 | # node.js | |
| 33 | 34 | # | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 5 | 5 | "semi": true, | |
| 6 | 6 | "singleQuote": true, | |
| 7 | 7 | "quoteProps": "preserve", | |
| 8 | - "trailingComma": "none", | ||
| 8 | + "trailingComma": "all", | ||
| 9 | 9 | "bracketSpacing": true, | |
| 10 | 10 | "arrowParens": "avoid" | |
| 11 | - } | ||
| 11 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ import { AppContext } from './src/context'; | |||
| 6 | 6 | import 'react-native-gesture-handler'; | |
| 7 | 7 | import messaging from '@react-native-firebase/messaging'; | |
| 8 | 8 | import { NavigationContainer } from '@react-navigation/native'; | |
| 9 | - import { createStackNavigator } from '@react-navigation/stack'; | ||
| 9 | + import { createNativeStackNavigator } from '@react-navigation/native-stack'; | ||
| 10 | 10 | ||
| 11 | 11 | import Lobby from './src/page/lobby'; | |
| 12 | 12 | import Chat from './src/page/chat'; | |
@@ -15,23 +15,23 @@ import Invite from './src/page/invite'; | |||
| 15 | 15 | import Profile from './src/page/profile'; | |
| 16 | 16 | ||
| 17 | 17 | import { onRemoteMessage } from './src/utils'; | |
| 18 | - import AsyncStorage from '@react-native-community/async-storage'; | ||
| 18 | + import AsyncStorage from '@react-native-async-storage/async-storage'; | ||
| 19 | 19 | ||
| 20 | - const Stack = createStackNavigator(); | ||
| 20 | + const Stack = createNativeStackNavigator(); | ||
| 21 | 21 | ||
| 22 | 22 | const appId = '9DA1B1F4-0BE6-4DA8-82C5-2E81DAB56F23'; | |
| 23 | 23 | const sendbird = new SendBird({ appId }); | |
| 24 | 24 | sendbird.setErrorFirstCallback(true); | |
| 25 | 25 | ||
| 26 | 26 | const initialState = { | |
| 27 | - sendbird | ||
| 27 | + sendbird, | ||
| 28 | 28 | }; | |
| 29 | 29 | ||
| 30 | 30 | const defaultHeaderOptions = { | |
| 31 | 31 | headerStyle: { | |
| 32 | - backgroundColor: '#742ddd' | ||
| 32 | + backgroundColor: '#742ddd', | ||
| 33 | 33 | }, | |
| 34 | - headerTintColor: '#fff' | ||
| 34 | + headerTintColor: '#fff', | ||
| 35 | 35 | }; | |
| 36 | 36 | ||
| 37 | 37 | const App = () => { | |
@@ -49,10 +49,10 @@ const App = () => { | |||
| 49 | 49 | ) { | |
| 50 | 50 | if (Platform.OS === 'ios') { | |
| 51 | 51 | const token = await messaging().getAPNSToken(); | |
| 52 | - await sendbird.registerAPNSPushTokenForCurrentUser(token); | ||
| 52 | + sendbird.registerAPNSPushTokenForCurrentUser(token); | ||
| 53 | 53 | } else { | |
| 54 | 54 | const token = await messaging().getToken(); | |
| 55 | - await sendbird.registerGCMPushTokenForCurrentUser(token); | ||
| 55 | + sendbird.registerGCMPushTokenForCurrentUser(token); | ||
| 56 | 56 | } | |
| 57 | 57 | } | |
| 58 | 58 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,7 +21,7 @@ import com.android.build.OutputFile | |||
| 21 | 21 | * // default. Can be overridden with ENTRY_FILE environment variable. | |
| 22 | 22 | * entryFile: "index.android.js", | |
| 23 | 23 | * | |
| 24 | - * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format | ||
| 24 | + * // https://reactnative.dev/docs/performance#enable-the-ram-format | ||
| 25 | 25 | * bundleCommand: "ram-bundle", | |
| 26 | 26 | * | |
| 27 | 27 | * // whether to bundle JS and assets in debug mode | |
@@ -115,27 +115,28 @@ def jscFlavor = 'org.webkit:android-jsc:+' | |||
| 115 | 115 | /** | |
| 116 | 116 | * Whether to enable the Hermes VM. | |
| 117 | 117 | * | |
| 118 | - * This should be set on project.ext.react and mirrored here. If it is not set | ||
| 118 | + * This should be set on project.ext.react and that value will be read here. If it is not set | ||
| 119 | 119 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode | |
| 120 | 120 | * and the benefits of using Hermes will therefore be sharply reduced. | |
| 121 | 121 | */ | |
| 122 | 122 | def enableHermes = project.ext.react.get("enableHermes", false); | |
| 123 | 123 | ||
| 124 | + /** | ||
| 125 | + * Architectures to build native code for in debug. | ||
| 126 | + */ | ||
| 127 | + def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures") | ||
| 128 | + | ||
| 124 | 129 | android { | |
| 125 | - compileSdkVersion rootProject.ext.compileSdkVersion | ||
| 130 | + ndkVersion rootProject.ext.ndkVersion | ||
| 126 | 131 | ||
| 127 | - compileOptions { | ||
| 128 | - sourceCompatibility JavaVersion.VERSION_1_8 | ||
| 129 | - targetCompatibility JavaVersion.VERSION_1_8 | ||
| 130 | - } | ||
| 132 | + compileSdkVersion rootProject.ext.compileSdkVersion | ||
| 131 | 133 | ||
| 132 | 134 | defaultConfig { | |
| 133 | 135 | applicationId "com.sendbird.chat.reactnative.sample" | |
| 134 | 136 | minSdkVersion rootProject.ext.minSdkVersion | |
| 135 | 137 | targetSdkVersion rootProject.ext.targetSdkVersion | |
| 136 | 138 | versionCode 1 | |
| 137 | 139 | versionName "1.0" | |
| 138 | - multiDexEnabled true | ||
| 139 | 140 | } | |
| 140 | 141 | splits { | |
| 141 | 142 | abi { | |
@@ -156,33 +157,32 @@ android { | |||
| 156 | 157 | buildTypes { | |
| 157 | 158 | debug { | |
| 158 | 159 | signingConfig signingConfigs.debug | |
| 160 | + if (nativeArchitectures) { | ||
| 161 | + ndk { | ||
| 162 | + abiFilters nativeArchitectures.split(',') | ||
| 163 | + } | ||
| 164 | + } | ||
| 159 | 165 | } | |
| 160 | 166 | release { | |
| 161 | 167 | // Caution! In production, you need to generate your own keystore file. | |
| 162 | - // see https://facebook.github.io/react-native/docs/signed-apk-android. | ||
| 168 | + // see https://reactnative.dev/docs/signed-apk-android. | ||
| 163 | 169 | signingConfig signingConfigs.debug | |
| 164 | 170 | minifyEnabled enableProguardInReleaseBuilds | |
| 165 | 171 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" | |
| 166 | 172 | } | |
| 167 | 173 | } | |
| 168 | 174 | ||
| 169 | - packagingOptions { | ||
| 170 | - pickFirst "lib/armeabi-v7a/libc++_shared.so" | ||
| 171 | - pickFirst "lib/arm64-v8a/libc++_shared.so" | ||
| 172 | - pickFirst "lib/x86/libc++_shared.so" | ||
| 173 | - pickFirst "lib/x86_64/libc++_shared.so" | ||
| 174 | - } | ||
| 175 | - | ||
| 176 | 175 | // applicationVariants are e.g. debug, release | |
| 177 | 176 | applicationVariants.all { variant -> | |
| 178 | 177 | variant.outputs.each { output -> | |
| 179 | 178 | // For each separate APK per architecture, set a unique version code as described here: | |
| 180 | 179 | // https://developer.android.com/studio/build/configure-apk-splits.html | |
| 180 | + // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. | ||
| 181 | 181 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] | |
| 182 | 182 | def abi = output.getFilter(OutputFile.ABI) | |
| 183 | 183 | if (abi != null) { // null for the universal-debug, universal-release variants | |
| 184 | 184 | output.versionCodeOverride = | |
| 185 | - versionCodes.get(abi) * 1048576 + defaultConfig.versionCode | ||
| 185 | + defaultConfig.versionCode * 1000 + versionCodes.get(abi) | ||
| 186 | 186 | } | |
| 187 | 187 | ||
| 188 | 188 | } | |
@@ -193,18 +193,17 @@ dependencies { | |||
| 193 | 193 | implementation fileTree(dir: "libs", include: ["*.jar"]) | |
| 194 | 194 | //noinspection GradleDynamicVersion | |
| 195 | 195 | implementation "com.facebook.react:react-native:+" // From node_modules | |
| 196 | - compile project(':react-native-fs') | ||
| 197 | - implementation 'com.google.firebase:firebase-messaging:20.1.7' | ||
| 198 | - implementation 'com.google.firebase:firebase-analytics:17.2.2' | ||
| 199 | 196 | ||
| 200 | - implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" | ||
| 197 | + implementation "androidx.appcompat:appcompat:1.0.0" | ||
| 198 | + implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" | ||
| 201 | 199 | ||
| 202 | 200 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { | |
| 203 | - exclude group:'com.facebook.fbjni' | ||
| 201 | + exclude group:'com.facebook.fbjni' | ||
| 204 | 202 | } | |
| 205 | 203 | ||
| 206 | 204 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { | |
| 207 | 205 | exclude group:'com.facebook.flipper' | |
| 206 | + exclude group:'com.squareup.okhttp3', module:'okhttp' | ||
| 208 | 207 | } | |
| 209 | 208 | ||
| 210 | 209 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { | |
@@ -223,7 +222,7 @@ dependencies { | |||
| 223 | 222 | // Run this once to be able to run the application with BUCK | |
| 224 | 223 | // puts all compile dependencies into folder libs for BUCK to use | |
| 225 | 224 | task copyDownloadableDepsToLibs(type: Copy) { | |
| 226 | - from configurations.compile | ||
| 225 | + from configurations.implementation | ||
| 227 | 226 | into 'libs' | |
| 228 | 227 | } | |
| 229 | 228 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -124,4 +124,4 @@ | |||
| 124 | 124 | } | |
| 125 | 125 | ], | |
| 126 | 126 | "configuration_version": "1" | |
| 127 | - } | ||
| 127 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,5 +4,10 @@ | |||
| 4 | 4 | ||
| 5 | 5 | <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> | |
| 6 | 6 | ||
| 7 | - <application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" /> | ||
| 7 | + <application | ||
| 8 | + android:usesCleartextTraffic="true" | ||
| 9 | + tools:targetApi="28" | ||
| 10 | + tools:ignore="GoogleAppIndexingWarning"> | ||
| 11 | + <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /> | ||
| 12 | + </application> | ||
| 8 | 13 | </manifest> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments