diff --git a/.env b/.env new file mode 100644 index 00000000..71ca8b0a --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +sentryDSN=${{ secrets.SENTRY_DSN }} +apiKey=${{ secrets.API_KEY }} +appId=${{ secrets.APP_ID }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index ecf1fe78..f77a9227 100644 --- a/.gitignore +++ b/.gitignore @@ -138,6 +138,5 @@ Firebase related .firebase # Environment variables -.env android/app/google-services.json /lib/utils/env_class.g.dart \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml index 61b6c4de..2be62ed6 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -9,6 +9,10 @@ # packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml +analyzer: + exclude: + - lib/utils/env_class.g.dart + linter: # The lint rules applied to this project can be customized in the # section below to disable rules from the `package:flutter_lints/flutter.yaml` diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart index a355e93b..b4dc294e 100644 --- a/lib/firebase_options.dart +++ b/lib/firebase_options.dart @@ -53,11 +53,11 @@ class DefaultFirebaseOptions { } } - static const FirebaseOptions android = FirebaseOptions( + static FirebaseOptions android = FirebaseOptions( apiKey: Env.apiKey, appId: Env.appId, - messagingSenderId: Env.messagingSenderId, - projectId: Env.projectId, - storageBucket: Env.storageBucket, + messagingSenderId: '1006104807752', + projectId: 'revanced-manager', + storageBucket: 'revanced-manager.appspot.com', ); } diff --git a/lib/utils/env_class.dart b/lib/utils/env_class.dart index 8bfeb53e..dd056e9e 100644 --- a/lib/utils/env_class.dart +++ b/lib/utils/env_class.dart @@ -5,20 +5,11 @@ part 'env_class.g.dart'; @Envied() abstract class Env { @EnviedField(varName: 'sentryDSN') - static const sentryDSN = _Env.sentryDSN; + static String sentryDSN = _Env.sentryDSN; @EnviedField(varName: 'apiKey') - static const apiKey = _Env.apiKey; + static String apiKey = _Env.apiKey; @EnviedField(varName: 'appId') - static const appId = _Env.appId; - - @EnviedField(varName: 'messagingSenderI') - static const messagingSenderId = _Env.messagingSenderId; - - @EnviedField(varName: 'projectId') - static const projectId = _Env.projectId; - - @EnviedField(varName: 'storageBucket') - static const storageBucket = _Env.storageBucket; + static String appId = _Env.appId; }