File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
sentry-android-gradle-plugin/src/main/groovy/io/sentry/android/gradle Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ Version 1.7.18
22--------------
33
44- Fix `--no-upload` option in Sentry Gradle Plugin under newer Groovy.
5+ - Allow overriding Sentry Organization and Project per buildType. (thanks nesterov-n)
56
67Version 1.7.17
78--------------
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ import org.apache.tools.ant.taskdefs.condition.Os
1212
1313class SentryPlugin implements Plugin<Project > {
1414 static final String GROUP_NAME = ' Sentry'
15+ private static final String SENTRY_ORG_PARAMETER = " sentryOrg"
16+ private static final String SENTRY_PROJECT_PARAMETER = " sentryProject"
1517
1618 /**
1719 * Return the correct sentry-cli executable path to use for the given project. This
@@ -247,6 +249,16 @@ class SentryPlugin implements Plugin<Project> {
247249 args << " --no-upload"
248250 }
249251
252+ def buildTypeProperties = variant. buildType. ext
253+ if (buildTypeProperties. has(SENTRY_ORG_PARAMETER )) {
254+ args. add(" --org" )
255+ args. add(buildTypeProperties. get(SENTRY_ORG_PARAMETER ). toString())
256+ }
257+ if (buildTypeProperties. has(SENTRY_PROJECT_PARAMETER )) {
258+ args. add(" --project" )
259+ args. add(buildTypeProperties. get(SENTRY_PROJECT_PARAMETER ). toString())
260+ }
261+
250262 if (Os . isFamily(Os . FAMILY_WINDOWS )) {
251263 commandLine(" cmd" , " /c" , * args)
252264 } else {
You can’t perform that action at this time.
0 commit comments