Skip to content

Commit

Permalink
Merge pull request #21452 from wordpress-mobile/dont_send_sentry_mapp…
Browse files Browse the repository at this point in the history
…ing_files_from_local_machines

Don't send sentry mapping files from local machines
  • Loading branch information
wzieba authored Nov 13, 2024
2 parents bf81edf + 79fe4cb commit a81d9ef
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ sentry {
logcat.enabled = false
}
autoInstallation.enabled = false
includeSourceContext = true
autoUploadSourceContext = true
includeDependenciesReport = false

includeSourceContext = gradle.ext.isCi
includeProguardMapping = gradle.ext.isCi
/* Sentry won't send source context or add performance instrumentations for debug builds
so we can save build times. Sending events will still work in debug builds
(if enabled in WPCrashLoggingDataProvider).
Expand Down Expand Up @@ -196,7 +197,7 @@ android {
targetCompatibility JvmTarget.fromTarget(libs.versions.java.get()).target
}

flavorDimensions "app", "buildType"
flavorDimensions = ['app', 'buildType']

productFlavors {
wordpress {
Expand Down Expand Up @@ -300,7 +301,7 @@ android {
checkGeneratedSources = true
lintConfig file("${project.rootDir}/config/lint/lint.xml")
baseline file("${project.rootDir}/config/lint/baseline.xml")
sarifReport = System.getenv('CI') ? true : false
sarifReport = gradle.ext.isCi
}

packagingOptions {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ measureBuilds {
findProperty('appsMetricsToken')
)
}
attachGradleScanId = System.getenv('CI')?.toBoolean() ?: false
attachGradleScanId = gradle.ext.isCi
}

allprojects {
Expand Down
2 changes: 1 addition & 1 deletion config/gradle/gradle_build_cache.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Only run build cache on CI builds.
if (System.getenv('CI')) {
if (gradle.ext.isCi) {
buildCache {
remote(HttpBuildCache) {
url = "http://10.0.2.215:5071/cache/"
Expand Down
2 changes: 1 addition & 1 deletion config/gradle/gradle_build_scan.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Only run build scan on CI builds.
if (System.getenv('CI')) {
if (gradle.ext.isCi) {
develocity {
buildScan {
termsOfUseUrl = 'https://gradle.com/terms-of-service'
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ plugins {
id "com.gradle.develocity" version "3.18.1"
}

gradle.ext.isCi = System.getenv('CI')?.toBoolean() ?: false

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
Expand Down

0 comments on commit a81d9ef

Please sign in to comment.