Skip to content

Commit 63ed251

Browse files
Fix: Aligns Android autoupload logic with iOS (#4262)
* Aligns Android autoupload logic with iOS * fix(gradle): DISABLE_NATIVE_UPLOAD should not affect JS source maps upload (#4263) --------- Co-authored-by: Krystof Woldrich <[email protected]>
1 parent 7bc4d75 commit 63ed251

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

packages/core/sentry.gradle

+10-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@ import org.apache.tools.ant.taskdefs.condition.Os
33
import java.util.regex.Matcher
44
import java.util.regex.Pattern
55

6+
project.ext.shouldSentryAutoUploadNative = { ->
7+
return System.getenv('SENTRY_DISABLE_NATIVE_DEBUG_UPLOAD') != 'true'
8+
}
9+
10+
project.ext.shouldSentryAutoUploadGeneral = { ->
11+
return System.getenv('SENTRY_DISABLE_AUTO_UPLOAD') != 'true'
12+
}
13+
614
project.ext.shouldSentryAutoUpload = { ->
7-
return System.getenv('SENTRY_DISABLE_AUTO_UPLOAD') != 'true' ||
8-
System.getenv('SENTRY_DISABLE_NATIVE_DEBUG_UPLOAD') != 'true'
15+
return shouldSentryAutoUploadGeneral() && shouldSentryAutoUploadNative()
916
}
1017

1118
def config = project.hasProperty("sentryCli") ? project.sentryCli : [];
@@ -99,7 +106,7 @@ gradle.projectsEvaluated {
99106

100107
/** Upload source map file to the sentry server via CLI call. */
101108
def cliTask = tasks.create(nameCliTask) {
102-
onlyIf { shouldSentryAutoUpload() }
109+
onlyIf { shouldSentryAutoUploadGeneral() }
103110
description = "upload debug symbols to sentry"
104111
group = 'sentry.io'
105112

0 commit comments

Comments
 (0)