Skip to content

Commit

Permalink
Merge cf7220e into b955f24
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasWerey authored Jan 22, 2025
2 parents b955f24 + cf7220e commit 5b53d99
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 76 deletions.
2 changes: 1 addition & 1 deletion apps/ledger-live-mobile/.env.android.staging
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
APP_NAME="LL [STAGING]"
SENTRY_DSN=https://0109819a39084e718120d031def0db38@o118392.ingest.sentry.io/6619343
SENTRY_DISABLE_AUTO_UPLOAD=true
SENTRY_DISABLE_AUTO_UPLOAD=false
ANALYTICS_TOKEN=Yc026bN2XbyBhTCPDFY0VibJugAKnjmh
BRAZE_ANDROID_API_KEY="4ef07be0-a4ea-4f73-81a9-760e473959f3"
BRAZE_IOS_API_KEY="4d6c9f5b-823e-4ea0-8158-5359bdf89618"
Expand Down
2 changes: 1 addition & 1 deletion apps/ledger-live-mobile/.env.ios.staging
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
APP_NAME="LL [STAGING]"
SENTRY_DSN=https://bd8b742115104e82b9ad3686fd9fd9f2@o118392.ingest.sentry.io/6619346
SENTRY_DISABLE_AUTO_UPLOAD=true
SENTRY_DISABLE_AUTO_UPLOAD=false
ANALYTICS_TOKEN=Yc026bN2XbyBhTCPDFY0VibJugAKnjmh
GOOGLE_SERVICE_INFO_NAME="GoogleService-Info-Staging"
BRAZE_ANDROID_API_KEY="4ef07be0-a4ea-4f73-81a9-760e473959f3"
Expand Down
55 changes: 40 additions & 15 deletions apps/ledger-live-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply plugin: "io.sentry.android.gradle"

apply plugin: 'com.google.gms.google-services'

Expand Down Expand Up @@ -63,6 +64,7 @@ react {
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
/* Autolinking */

autolinkLibrariesWithApp()
}

Expand All @@ -73,13 +75,6 @@ project.ext.react = [
enableHermes: true,
bundleInDebug: System.getenv("ANDROID_BUNDLE_IN_DEBUG") != null, // Generates JS bundle and sourcemap at build time
]
project.ext.sentryCli = [
logLevel: "debug"
]

if (System.getenv("SENTRY_AUTH_TOKEN") != null) {
apply from: "../../node_modules/@sentry/react-native/sentry.gradle"
}

/**
* Set this to true to create four separate APKs instead of one,
Expand Down Expand Up @@ -137,14 +132,6 @@ android {
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}


if (System.getenv("SENTRY_AUTH_TOKEN") != null) {
sentry {
autoUploadProguardMapping = shouldSentryAutoUpload()
uploadNativeSymbols = shouldSentryAutoUpload()
}
}

configurations.all {
resolutionStrategy {
// Needed for Braze
Expand Down Expand Up @@ -207,6 +194,44 @@ android {
}
}


apply from: "../../node_modules/@sentry/react-native/sentry.gradle"

project.ext.sentryCli = [
logLevel: "debug",
sentryProperties: '../sentry.properties'
]

sentry {
// Enables or disables the automatic configuration of Native Symbols
// for Sentry. This executes sentry-cli automatically so
// you don't need to do it manually.
// Default is disabled.
uploadNativeSymbols = true

// Enables or disables the automatic upload of the app's native source code to Sentry.
// This executes sentry-cli with the --include-sources param automatically so
// you don't need to do it manually.
// This option has an effect only when [uploadNativeSymbols] is enabled.
// Default is disabled.
includeNativeSources = true

// `@sentry/react-native` ships with compatible `sentry-android`
// This option would install the latest version that ships with the SDK or SAGP (Sentry Android Gradle Plugin)
// which might be incompatible with the React Native SDK
// Enable auto-installation of Sentry components (sentry-android SDK and okhttp, timber and fragment integrations).
// Default is enabled.
autoInstallation {
enabled = false
}


autoUploadProguardMapping = shouldSentryAutoUpload()
uploadNativeSymbols = shouldSentryAutoUpload()
}



dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
Expand Down
2 changes: 1 addition & 1 deletion apps/ledger-live-mobile/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("io.sentry:sentry-android-gradle-plugin:4.14.1")
classpath("io.sentry:sentry-android-gradle-plugin:4.14.1")
classpath("com.android.tools.build:gradle:7.4.1")
classpath("com.facebook.react:react-native-gradle-plugin")
// NOTE: Do not place your application dependencies here; they belong
Expand Down
3 changes: 3 additions & 0 deletions apps/ledger-live-mobile/android/sentry.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
defaults.url=https://sentry.io/
defaults.org=ledger
default.project=ledger-live-mobile
cli.executable=../node_modules/@sentry/cli/bin/sentry-cli

4 changes: 2 additions & 2 deletions apps/ledger-live-mobile/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const forcedDependencies = [
];

const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");

const { withSentryConfig } = require("@sentry/react-native/metro");
const removeStarPath = moduleName => moduleName.replace("/*", "");

const buildTsAlias = (conf = {}) =>
Expand Down Expand Up @@ -98,4 +98,4 @@ const metroConfig = {
},
};

module.exports = mergeConfig(getDefaultConfig(__dirname), metroConfig);
module.exports = withSentryConfig(mergeConfig(getDefaultConfig(__dirname), metroConfig));
2 changes: 1 addition & 1 deletion apps/ledger-live-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"@react-native-community/cli-platform-ios": "14.1.0",
"@react-native/babel-preset": "0.75.4",
"@react-native/dev-middleware": "0.75.4",
"@sentry/cli": "2.40.0",
"@sentry/cli": "2.41.1",
"@swc/core": "1.4.11",
"@swc/jest": "0.2.36",
"@testing-library/jest-native": "5.4.3",
Expand Down
Loading

0 comments on commit 5b53d99

Please sign in to comment.