feat: BLoC tests complets + sécurité production + freerasp 7.5.1 migration
## Tests BLoC (Task P2.4 Mobile) - 25 nouveaux fichiers *_bloc_test.dart + mocks générés (build_runner) - Features couvertes : authentication, admin_users, adhesions, backup, communication/messaging, contributions, dashboard, finance (approval/budget), events, explore/network, feed, logs_monitoring, notifications, onboarding, organizations (switcher/types/CRUD), profile, reports, settings, solidarity - ~380 tests, > 80% coverage BLoCs ## Sécurité Production (Task P2.2) - lib/core/security/app_integrity_service.dart (freerasp 7.5.1) - Migration API breaking changes freerasp 7.5.1 : - onRootDetected → onPrivilegedAccess - onDebuggerDetected → onDebug - onSignatureDetected → onAppIntegrity - onHookDetected → onHooks - onEmulatorDetected → onSimulator - onUntrustedInstallationSourceDetected → onUnofficialStore - onDeviceBindingDetected → onDeviceBinding - onObfuscationIssuesDetected → onObfuscationIssues - Talsec.start() split → start() + attachListener() - const AndroidConfig/IOSConfig → final (constructors call ConfigVerifier) - supportedAlternativeStores → supportedStores ## Pubspec - bloc_test: ^9.1.7 → ^10.0.0 (compat flutter_bloc ^9.0.0) - freerasp 7.5.1 ## Config - android/app/build.gradle : ajustements release - lib/core/config/environment.dart : URLs API actualisées - lib/main.dart + app_router : intégrations sécurité/BLoC ## Cleanup - Suppression docs intermédiaires (TACHES_*.md, TASK_*_COMPLETION_REPORT.md, TESTS_UNITAIRES_PROGRESS.md) - .g.dart régénérés (json_serializable) - .mocks.dart régénérés (mockito) ## Résultat - 142 fichiers, +27 596 insertions - Toutes les tâches P2 mobile complétées Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,11 +7,14 @@ library main;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
import 'app/app.dart';
|
||||
import 'core/config/environment.dart';
|
||||
import 'core/l10n/locale_provider.dart';
|
||||
import 'core/theme/theme_provider.dart';
|
||||
import 'core/di/injection.dart';
|
||||
import 'core/security/app_integrity_service.dart';
|
||||
import 'core/utils/logger.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@@ -21,6 +24,12 @@ void main() async {
|
||||
// Initialisation unique et automatique (DRY)
|
||||
await configureDependencies();
|
||||
|
||||
// Surveillance intégrité applicative MASVS v2 RESILIENCE
|
||||
await AppIntegrityService.instance.initialize(
|
||||
onThreatDetected: (threat) =>
|
||||
AppLogger.warning('Threat detected: $threat', tag: 'Security'),
|
||||
);
|
||||
|
||||
// Mode immersif et config système
|
||||
await _configureApp();
|
||||
|
||||
@@ -29,7 +38,25 @@ void main() async {
|
||||
|
||||
final themeProvider = await ThemeProvider.load();
|
||||
|
||||
runApp(UnionFlowApp(localeProvider: localeProvider, themeProvider: themeProvider));
|
||||
if (AppConfig.enableCrashReporting && AppConfig.sentryDsn.isNotEmpty) {
|
||||
await SentryFlutter.init(
|
||||
(options) {
|
||||
options.dsn = AppConfig.sentryDsn;
|
||||
options.environment = AppConfig.environment.name;
|
||||
options.tracesSampleRate = AppConfig.isProd ? 0.2 : 1.0;
|
||||
options.debug = AppConfig.enableDebugMode;
|
||||
options.sendDefaultPii = false;
|
||||
},
|
||||
appRunner: () => runApp(
|
||||
DefaultAssetBundle(
|
||||
bundle: SentryAssetBundle(),
|
||||
child: UnionFlowApp(localeProvider: localeProvider, themeProvider: themeProvider),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
runApp(UnionFlowApp(localeProvider: localeProvider, themeProvider: themeProvider));
|
||||
}
|
||||
}
|
||||
|
||||
/// Configure les paramètres globaux de l'application
|
||||
|
||||
Reference in New Issue
Block a user