Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ plugins {
alias(libs.plugins.compose.compiler)
}

sentry {
projectName = project.property("sentryAndroidProject")?.toString()
}

android {
namespace = "au.com.shiftyjelly.pocketcasts"

Expand Down
4 changes: 4 additions & 0 deletions automotive/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ plugins {
alias(libs.plugins.compose.compiler)
}

sentry {
projectName = project.property("sentryAutomotiveProject")?.toString()
}

android {
namespace = "au.com.shiftyjelly.pocketcasts"

Expand Down
10 changes: 6 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import com.google.devtools.ksp.gradle.KspGradleSubplugin
import io.sentry.android.gradle.extensions.InstrumentationFeature
import io.sentry.android.gradle.extensions.SentryPluginExtension
import java.util.EnumSet
import kotlin.collections.addAll
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions
import org.jetbrains.kotlin.gradle.plugin.KotlinBasePlugin
Expand Down Expand Up @@ -174,7 +173,7 @@ subprojects {
}

plugins.withId(rootProject.libs.plugins.sentry.get().pluginId) {
configureSentry()
applyCommonSentryConfiguration()
}

configurations.configureEach {
Expand Down Expand Up @@ -419,8 +418,11 @@ subprojects {
}
}

fun Project.configureSentry() {
fun Project.applyCommonSentryConfiguration() {
extensions.getByType(SentryPluginExtension::class.java).apply {
authToken = project.property("sentryAuthToken")?.toString()
org = project.property("sentryOrg")?.toString()

val shouldUploadDebugFiles = System.getenv()["CI"].toBoolean() &&
!project.properties["skipSentryProguardMappingUpload"]?.toString().toBoolean()
includeProguardMapping = shouldUploadDebugFiles
Expand All @@ -431,7 +433,7 @@ fun Project.configureSentry() {
}
autoInstallation.enabled = false
includeDependenciesReport = false
ignoredBuildTypes = setOf("debug", "debugProd")
ignoredBuildTypes = setOf("debug", "debugProd", "prototype")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unrelated change but I forgot to exclude prototype builds from Sentry uploads.

}
}

Expand Down
5 changes: 5 additions & 0 deletions dependencies.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,10 @@ project.apply {
set("encryptionKey", secretProperties.getProperty("encryption_key", ""))
set("appSecret", secretProperties.getProperty("app_secret", ""))
set("metaAppId", secretProperties.getProperty("metaAppId", ""))
set("sentryAuthToken", secretProperties.getProperty("sentryAuthToken", ""))
set("sentryOrg", secretProperties.getProperty("sentryOrg", ""))
set("sentryAndroidProject", secretProperties.getProperty("sentryAndroidProject", ""))
set("sentryAutomotiveProject", secretProperties.getProperty("sentryAutomotiveProject", ""))
set("sentryWearProject", secretProperties.getProperty("sentryWearProject", ""))
}
}
4 changes: 4 additions & 0 deletions wear/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ plugins {
alias(libs.plugins.compose.compiler)
}

sentry {
projectName = project.property("sentryWearProject")?.toString()
}

android {
namespace = "au.com.shiftyjelly.pocketcasts"

Expand Down
Loading