This commit is contained in:
GOVINDDIXIT 2020-07-25 13:13:00 +05:30
parent 5139d0f5de
commit 50862b1438
8 changed files with 21 additions and 25829 deletions

View File

@ -2,19 +2,12 @@ def taskRequests = getGradle().getStartParameter().getTaskRequests().toString().
def isPlay = !taskRequests.contains("foss")
apply plugin: "com.android.application"
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'kotlin-android'
<<<<<<< HEAD
if (isPlay) {
apply plugin: "io.fabric"
apply plugin: "com.google.firebase.firebase-perf"
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.bugsnag.android.gradle'
}
=======
apply plugin: 'com.bugsnag.android.gradle'
>>>>>>> e5aaa667e7921a827df304b9d64320e14c7a55d3
import com.android.build.OutputFile
@ -180,8 +173,10 @@ android {
minifyEnabled enableProguardInReleaseBuilds
setProguardFiles([getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'])
signingConfig signingConfigs.release
firebaseCrashlytics {
nativeSymbolUploadEnabled true
if (isPlay) {
firebaseCrashlytics {
nativeSymbolUploadEnabled true
}
}
}
}
@ -243,11 +238,6 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
playImplementation "com.google.firebase:firebase-messaging:18.0.0"
playImplementation "com.google.firebase:firebase-core:16.0.9"
playImplementation "com.google.firebase:firebase-perf:17.0.2"
playImplementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') {
transitive = true
}
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
@ -279,11 +269,7 @@ task copyDownloadableDepsToLibs(type: Copy) {
into 'libs'
}
<<<<<<< HEAD
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
if (isPlay) {
apply plugin: 'com.google.gms.google-services'
}
=======
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
>>>>>>> e5aaa667e7921a827df304b9d64320e14c7a55d3

View File

@ -50,9 +50,6 @@ public class MainApplication extends Application implements ReactApplication, IN
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
if (BuildConfig.PLAY_BUILD) {
packages.add(new RNFirebaseCrashlyticsPackage());
packages.add(new RNFirebaseAnalyticsPackage());
packages.add(new RNFirebasePerformancePackage());
packages.add(new RNNotificationsPackage(MainApplication.this));
}
packages.add(new KeyboardInputPackage(MainApplication.this));

View File

@ -24,7 +24,6 @@ buildscript {
dependencies {
if (isPlay) {
classpath 'com.google.gms:google-services:4.2.0'
classpath 'com.google.firebase:perf-plugin:1.2.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0'
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:4.+'
}

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -1,7 +1,7 @@
import { Client } from 'bugsnag-react-native';
import analytics from '@react-native-firebase/analytics';
import crashlytics from '@react-native-firebase/crashlytics';
import { isGooglePlayBuild } from '../constants/environment';
import { isGooglePlayBuild } from '../../constants/environment';
import config from '../../../config';
import events from './events';
@ -21,15 +21,17 @@ export const logServerVersion = (serverVersion) => {
};
export const logEvent = (eventName, payload) => {
analytics().logEvent(eventName, payload);
leaveBreadcrumb(eventName, payload);
if (isGooglePlayBuild) {
analytics().logEvent(eventName, payload);
leaveBreadcrumb(eventName, payload);
}
};
export const setCurrentScreen = (currentScreen) => {
if (isGooglePlayBuild) {
analytics().setCurrentScreen(currentScreen);
leaveBreadcrumb(currentScreen, { type: 'navigation' });
}
leaveBreadcrumb(currentScreen, { type: 'navigation' });
};
export default (e) => {
@ -41,7 +43,9 @@ export default (e) => {
}
};
});
crashlytics().recordError(e);
if (isGooglePlayBuild) {
crashlytics().recordError(e);
}
} else {
console.log(e);
}

View File

@ -121,15 +121,14 @@ class SettingsView extends React.Component {
AsyncStorage.setItem(CRASH_REPORT_KEY, JSON.stringify(value));
const { toggleCrashReport } = this.props;
toggleCrashReport(value);
loggerConfig.autoNotify = value;
if (isGooglePlayBuild) {
loggerConfig.autoNotify = value;
analytics().setAnalyticsCollectionEnabled(value);
}
if (value) {
loggerConfig.clearBeforeSendCallbacks();
} else {
loggerConfig.registerBeforeSendCallback(() => false);
if (value) {
loggerConfig.clearBeforeSendCallbacks();
} else {
loggerConfig.registerBeforeSendCallback(() => false);
}
}
}

View File

@ -1 +0,0 @@
{"anonymousUserId":"de10e8cb-9bcb-436e-94ac-f3a9a9a945b2"}

25792
package-lock.json generated

File diff suppressed because it is too large Load Diff