Skip to content

Commit c3fd4a5

Browse files
committed
Update dependencies
1 parent be07129 commit c3fd4a5

31 files changed

+3016
-2971
lines changed

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
extends: ['@react-native-community', 'plugin:prettier/recommended'],
3+
plugins: ['simple-import-sort'],
4+
root: true,
5+
rules: {
6+
'import/order': 'off',
7+
'simple-import-sort/exports': 'error',
8+
'simple-import-sort/imports': 'error',
9+
'sort-imports': 'off',
10+
},
11+
}

.eslintrc.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175

176176
END OF TERMS AND CONDITIONS
177177

178-
Copyright 2020 Oleksandr Demchenko
178+
Copyright 2021 Oleksandr Demchenko
179179

180180
Licensed under the Apache License, Version 2.0 (the "License");
181181
you may not use this file except in compliance with the License.

example/.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
extends: ['@react-native-community', 'plugin:prettier/recommended'],
3+
plugins: ['simple-import-sort'],
4+
root: true,
5+
rules: {
6+
'import/order': 'off',
7+
'simple-import-sort/exports': 'error',
8+
'simple-import-sort/imports': 'error',
9+
'sort-imports': 'off',
10+
},
11+
}

example/.eslintrc.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

example/android/app/src/debug/java/chat/flyer/ReactNativeFlipper.java

Lines changed: 0 additions & 74 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package chat.flyer
2+
3+
import android.content.Context
4+
import com.facebook.flipper.android.AndroidFlipperClient
5+
import com.facebook.flipper.android.utils.FlipperUtils
6+
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin
7+
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin
8+
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin
9+
import com.facebook.flipper.plugins.inspector.DescriptorMapping
10+
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin
11+
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor
12+
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin
13+
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin
14+
import com.facebook.react.ReactInstanceManager
15+
import com.facebook.react.ReactInstanceManager.ReactInstanceEventListener
16+
import com.facebook.react.bridge.ReactContext
17+
import com.facebook.react.modules.network.NetworkingModule
18+
19+
object ReactNativeFlipper {
20+
@JvmStatic
21+
fun initializeFlipper(context: Context?, reactInstanceManager: ReactInstanceManager) {
22+
if (FlipperUtils.shouldEnableFlipper(context)) {
23+
val client = AndroidFlipperClient.getInstance(context)
24+
client.addPlugin(InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()))
25+
client.addPlugin(DatabasesFlipperPlugin(context))
26+
client.addPlugin(SharedPreferencesFlipperPlugin(context))
27+
client.addPlugin(CrashReporterPlugin.getInstance())
28+
val networkFlipperPlugin = NetworkFlipperPlugin()
29+
NetworkingModule.setCustomClientBuilder { builder -> builder.addNetworkInterceptor(FlipperOkhttpInterceptor(networkFlipperPlugin)) }
30+
client.addPlugin(networkFlipperPlugin)
31+
client.start()
32+
33+
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
34+
// Hence we run if after all native modules have been initialized
35+
val reactContext = reactInstanceManager.currentReactContext
36+
if (reactContext == null) {
37+
reactInstanceManager.addReactInstanceEventListener(
38+
object : ReactInstanceEventListener {
39+
override fun onReactContextInitialized(reactContext: ReactContext) {
40+
reactInstanceManager.removeReactInstanceEventListener(this)
41+
reactContext.runOnNativeModulesQueueThread { client.addPlugin(FrescoFlipperPlugin()) }
42+
}
43+
})
44+
} else {
45+
client.addPlugin(FrescoFlipperPlugin())
46+
}
47+
}
48+
}
49+
}

example/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ buildscript {
66
minSdkVersion = 16
77
compileSdkVersion = 29
88
targetSdkVersion = 29
9-
kotlinVersion = '1.4.10'
9+
kotlinVersion = '1.4.21'
1010
}
1111
repositories {
1212
google()
1313
jcenter()
1414
}
1515
dependencies {
16-
classpath 'com.android.tools.build:gradle:4.0.1'
16+
classpath 'com.android.tools.build:gradle:4.1.2'
1717
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
18-
classpath 'com.google.gms:google-services:4.3.3'
18+
classpath 'com.google.gms:google-services:4.3.4'
1919

2020
// NOTE: Do not place your application dependencies here; they belong
2121
// in the individual module build.gradle files

example/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ android.useAndroidX=true
2525
android.enableJetifier=true
2626

2727
# Version of flipper SDK to use with React Native
28-
FLIPPER_VERSION=0.39.0
28+
FLIPPER_VERSION=0.73.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)