diff --git a/android/settings.gradle b/android/settings.gradle index 2d258ebc..83ee74f9 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -23,4 +23,9 @@ plugins { id "org.jetbrains.kotlin.android" version "1.9.22" apply false } -include ":app" \ No newline at end of file +include ":app" + +import org.apache.tools.ant.DirectoryScanner + +DirectoryScanner.removeDefaultExclude('**/.git') +DirectoryScanner.removeDefaultExclude('**/.git/**') \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index c83c16c6..1ebaa76c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -95,7 +95,7 @@ Future main() async { await SentryHive.openBox('sequences'); await SentryHive.openBox('devices'); await SentryFlutter.init( - (options) { + (options) async { options.dsn = 'https://284f1830184d74dbbbb48ad14b577ffc@sentry.codel1417.xyz/3'; options.addIntegration(LoggingIntegration()); options.attachScreenshot = true; //not supported on GlitchTip @@ -108,6 +108,7 @@ Future main() async { options.enableAutoNativeBreadcrumbs = true; options.enableAutoPerformanceTracing = true; options.beforeSend = beforeSend; + options.release = (await rootBundle.loadString('.git/HEAD')).trim(); }, // Init your App. appRunner: () => runApp( diff --git a/pubspec.yaml b/pubspec.yaml index 187e0895..d17d4afd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -68,7 +68,8 @@ dev_dependencies: flutter: uses-material-design: true generate: true - + assets: + - .git/HEAD sentry: upload_debug_symbols: true upload_source_maps: true