+ {codeToJsx(
+ `sentry {
+ ${feature} {
+ enabled = providers.environmentVariable("GITHUB_ACTIONS").isPresent
+ }
+}`,
+ 'kotlin'
+ )}
+
+
+ {codeToJsx(
+ `sentry {
+ ${feature} {
+ enabled = providers.environmentVariable("GITHUB_ACTIONS").present
+ }
+}`,
+ 'groovy'
+ )}
+
+
+ The Gradle plugin automatically detects build metadata from your git repository.
+ On GitHub Actions, all metadata is automatically detected. On other CI systems,
+ you may need to manually set some values using the vcsInfo extension.
+
6.0.0-beta1
+ + Set the auth token as an environment variable to be used when running your + release build. +
+
+ {codeToJsx(`export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___`, 'bash')}
+
+ Enable uploading for {featureName} for CI builds.
++ Invoke the following Gradle tasks to build your app and trigger the upload. +
+{codeToJsx(`./gradlew bundleRelease`, 'bash')}
+ {codeToJsx(`./gradlew assembleRelease`, 'bash')}
+ + After an upload has successfully processed, confirm the metadata is correct in + the Sentry UI +
+
+
+ The Gradle plugin automatically detects build metadata from your git repository.
+ On GitHub Actions, all metadata is automatically detected. On other CI systems,
+ you may need to manually set some values using the vcsInfo extension.
+
Configure overrides in your Gradle build configuration:
+ +
+ {codeToJsx(
+ `sentry {
+ ${feature} {
+ enabled = providers.environmentVariable("GITHUB_ACTIONS").isPresent
+ }
+
+ vcsInfo {
+ headSha.set("abc123")
+ baseSha.set("def456")
+ vcsProvider.set("github")
+ headRepoName.set("organization/repository")
+ baseRepoName.set("organization/repository")
+ headRef.set("feature-branch")
+ baseRef.set("main")
+ prNumber.set(42)
+ }
+}`,
+ 'kotlin'
+ )}
+
+
+ {codeToJsx(
+ `sentry {
+ ${feature} {
+ enabled = providers.environmentVariable("GITHUB_ACTIONS").present
+ }
+
+ vcsInfo {
+ headSha = 'abc123'
+ baseSha = 'def456'
+ vcsProvider = 'github'
+ headRepoName = 'organization/repository'
+ baseRepoName = 'organization/repository'
+ headRef = 'feature-branch'
+ baseRef = 'main'
+ prNumber = 42
+ }
+}`,
+ 'groovy'
+ )}
+
+
+ Available vcsInfo properties:
+
| Property | +Type | +Description | +
|---|---|---|
+ headSha
+ |
+ String | +Current commit SHA | +
+ baseSha
+ |
+ String | +Base commit SHA (for comparison) | +
+ vcsProvider
+ |
+ String | +VCS provider (e.g., "github") | +
+ headRepoName
+ |
+ String | +Repository name (org/repo format) | +
+ baseRepoName
+ |
+ String | +Base repository name | +
+ headRef
+ |
+ String | +Branch or tag name | +
+ baseRef
+ |
+ String | +Base branch name | +
+ prNumber
+ |
+ Int | +Pull request number | +