Files
mattermost-mobile/patches/@sentry+react-native+4.6.0.patch
Avinash Lingaloo ecb394755c test
2022-10-14 19:47:20 +04:00

51 lines
2.4 KiB
Diff

diff --git a/node_modules/@sentry/react-native/sentry.gradle b/node_modules/@sentry/react-native/sentry.gradle
index c54bf8c..2203438 100644
--- a/node_modules/@sentry/react-native/sentry.gradle
+++ b/node_modules/@sentry/react-native/sentry.gradle
@@ -121,14 +121,22 @@ gradle.projectsEvaluated {
cliExecutable = cliExecutable.replaceAll("/", "\\\\")
}
+ def sourcemapFile = new File(sourcemapOutput)
+ def bundleFile = new File(bundleOutput)
+ if(!sourcemapFile.isFile()){
+ throw new GradleException('>>> sourcemapFile invalid path')
+ }
+ if(!bundleFile.isFile()){
+ throw new GradleException('>>> bundleFile invalid path')
+ }
//
// based on:
// https://github.com/getsentry/sentry-cli/blob/master/src/commands/react_native_gradle.rs
//
def args = [cliExecutable]
- args.addAll(!config.logLevel ? [] : [
- "--log-level", config.logLevel // control verbosity of the output
+ args.addAll([
+ "--log-level", "debug" // control verbosity of the output
])
args.addAll(!config.flavorAware ? [] : [
"--url", sentryProps.get("defaults.url"),
@@ -211,10 +219,10 @@ static extractBundleTaskArguments(cmdArgs, Project project) {
cmdArgs.eachWithIndex { String arg, int i ->
if (arg == "--bundle-output") {
bundleOutput = cmdArgs[i + 1]
- project.logger.info("--bundle-output: `${bundleOutput}`")
+ project.logger.debug("--bundle-output: `${bundleOutput}`")
} else if (arg == "--sourcemap-output") {
sourcemapOutput = cmdArgs[i + 1]
- project.logger.info("--sourcemap-output param: `${sourcemapOutput}`")
+ project.logger.debug("--sourcemap-output param: `${sourcemapOutput}`")
}
}
@@ -251,6 +259,7 @@ static extractBundleTaskArguments(cmdArgs, Project project) {
/** Force Bundle task to produce sourcemap files if they are not pre-configured by user yet. */
def forceSourceMapOutputFromBundleTask(bundleTask) {
def props = bundleTask.getProperties()
+ project.logger.debug('bundleTask', bundleTask)
def cmd = props.get("commandLine") as List<String>
def cmdArgs = props.get("args") as List<String>
def shouldCleanUp = false