diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 13fb3be9..cd3e4fc6 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -22,8 +22,6 @@ jobs: - uses: SpicyPizza/create-envfile@v1 with: envkey_sentryDSN: ${{ secrets.SENTRY_DSN }} - envkey_apiKey: ${{ secrets.API_KEY }} - envkey_appId: ${{ secrets.APP_ID }} - name: Set up Flutter run: flutter pub get - name: Generate files with Builder diff --git a/.gitignore b/.gitignore index bbdde477..a78395b8 100644 --- a/.gitignore +++ b/.gitignore @@ -136,6 +136,3 @@ app.*.map.json Firebase related .firebase - -# Environment variables -android/app/google-services.json \ No newline at end of file diff --git a/assets/i18n/en_US.json b/assets/i18n/en_US.json index 4a60154a..111742e6 100644 --- a/assets/i18n/en_US.json +++ b/assets/i18n/en_US.json @@ -134,8 +134,6 @@ "snackbarMessage": "Copied to clipboard", "sentryLabel": "Sentry Logging", "sentryHint": "Send anonymous logs to help us improve ReVanced Manager", - "firebaseCrashlyticsLabel": "Firebase Crashlytics", - "firebaseCrashlyticsHint": "Send anonymous crash reports to help us improve ReVanced Manager", "restartAppForChanges": "Restart the app to apply changes", "deleteKeystoreLabel": "Delete keystore", "deleteKeystoreHint": "Delete the keystore used to sign the app", diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart deleted file mode 100644 index 4f612e7a..00000000 --- a/lib/firebase_options.dart +++ /dev/null @@ -1,63 +0,0 @@ -// File generated by FlutterFire CLI. -// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members -import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; -import 'package:flutter/foundation.dart' - show defaultTargetPlatform, kIsWeb, TargetPlatform; -import 'package:flutter_dotenv/flutter_dotenv.dart'; - -/// Default [FirebaseOptions] for use with your Firebase apps. -/// -/// Example: -/// ```dart -/// import 'firebase_options.dart'; -/// // ... -/// await Firebase.initializeApp( -/// options: DefaultFirebaseOptions.currentPlatform, -/// ); -/// ``` -class DefaultFirebaseOptions { - static FirebaseOptions get currentPlatform { - if (kIsWeb) { - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for web - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - } - switch (defaultTargetPlatform) { - case TargetPlatform.android: - return android; - case TargetPlatform.iOS: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for ios - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - case TargetPlatform.macOS: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for macos - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - case TargetPlatform.windows: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for windows - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - case TargetPlatform.linux: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for linux - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - default: - throw UnsupportedError( - 'DefaultFirebaseOptions are not supported for this platform.', - ); - } - } - - static FirebaseOptions android = FirebaseOptions( - apiKey: dotenv.env['apiKey'] ?? '', - appId: dotenv.env['appId'] ?? '', - messagingSenderId: '1006104807752', - projectId: 'revanced-manager', - storageBucket: 'revanced-manager.appspot.com', - ); -} diff --git a/lib/main.dart b/lib/main.dart index 32969f97..56f32b8e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,3 @@ -import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; @@ -12,8 +11,6 @@ import 'package:revanced_manager/ui/views/navigation/navigation_view.dart'; import 'package:stacked_themes/stacked_themes.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:timezone/data/latest.dart' as tz; -import 'package:firebase_core/firebase_core.dart'; -import 'firebase_options.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; Future main() async { @@ -25,15 +22,6 @@ Future main() async { String apiUrl = locator().getApiUrl(); await locator().initialize(apiUrl); bool isSentryEnabled = locator().isSentryEnabled(); - // bool isCrashlyticsEnabled = locator().isCrashlyticsEnabled(); - // Remove this section if you are building from source and don't have firebase config - // if (isCrashlyticsEnabled) { - // await Firebase.initializeApp(); - // Firebase.app().setAutomaticDataCollectionEnabled(true); - // } else { - // await Firebase.initializeApp(); - // Firebase.app().setAutomaticDataCollectionEnabled(false); - // } locator().initialize(); await locator().initialize(); tz.initializeTimeZones(); @@ -58,9 +46,6 @@ Future main() async { } as BeforeSendCallback?; }, appRunner: () { - // if (isCrashlyticsEnabled) { - // FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError; - // } runApp(const MyApp()); }, ); diff --git a/lib/services/manager_api.dart b/lib/services/manager_api.dart index 308562f4..af5c3157 100644 --- a/lib/services/manager_api.dart +++ b/lib/services/manager_api.dart @@ -90,14 +90,6 @@ class ManagerAPI { await _prefs.setBool('sentryEnabled', value); } - bool isCrashlyticsEnabled() { - return _prefs.getBool('crashlyticsEnabled') ?? true; - } - - Future setCrashlyticsStatus(bool value) async { - await _prefs.setBool('crashlyticsEnabled', value); - } - Future deleteTempFolder() async { final Directory dir = Directory('/data/local/tmp/revanced-manager'); if (await dir.exists()) { diff --git a/lib/ui/views/settings/settings_view.dart b/lib/ui/views/settings/settings_view.dart index c1603fc8..fdbacf2c 100644 --- a/lib/ui/views/settings/settings_view.dart +++ b/lib/ui/views/settings/settings_view.dart @@ -206,24 +206,6 @@ class SettingsView extends StatelessWidget { value: model.isSentryEnabled(), onTap: (value) => model.useSentry(value), ), - const SizedBox(height: 20.0), - CustomSwitchTile( - padding: const EdgeInsets.symmetric(horizontal: 20.0), - title: I18nText( - 'settingsView.firebaseCrashlyticsLabel', - child: const Text( - '', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w500, - ), - ), - ), - subtitle: - I18nText('settingsView.firebaseCrashlyticsHint'), - value: model.isCrashlyticsEnabled(), - onTap: (value) => model.useCrashlytics(value), - ), ], ), _settingsDivider, diff --git a/lib/ui/views/settings/settings_viewmodel.dart b/lib/ui/views/settings/settings_viewmodel.dart index c7f69a7a..728815b9 100644 --- a/lib/ui/views/settings/settings_viewmodel.dart +++ b/lib/ui/views/settings/settings_viewmodel.dart @@ -327,16 +327,6 @@ class SettingsViewModel extends BaseViewModel { notifyListeners(); } - bool isCrashlyticsEnabled() { - return _managerAPI.isCrashlyticsEnabled(); - } - - void useCrashlytics(bool value) { - _managerAPI.setCrashlyticsStatus(value); - _toast.showBottom('settingsView.restartAppForChanges'); - notifyListeners(); - } - void deleteKeystore() { _managerAPI.deleteKeystore(); _toast.showBottom('settingsView.deletedKeystore'); diff --git a/pubspec.yaml b/pubspec.yaml index a3f4f1fb..dc80b64a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -73,8 +73,6 @@ dependencies: url_launcher: ^6.1.5 wakelock: ^0.6.2 sentry_dio: ^6.12.2 - firebase_core: ^1.24.0 - firebase_crashlytics: ^2.9.0 flutter_dotenv: ^5.0.2 dev_dependencies: