Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 1 addition & 6 deletions .configure
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
{
"project_name": "pocketcasts-android",
"branch": "trunk",
"pinned_hash": "29f04c18842c391363c5129b59b8a32973319611",
"pinned_hash": "f8db88d1a1d1149ce3a144b7c629e36717c885ea",
"files_to_copy": [
{
"file": "android/pocket-casts/secret.properties",
"destination": "secret.properties",
"encrypt": true
},
{
"file": "android/pocket-casts/sentry.properties",
"destination": "sentry.properties",
"encrypt": true
},
{
"file": "android/pocket-casts/google-services.json",
"destination": "app/google-services.json",
Expand Down
Binary file modified .configure-files/secret.properties.enc
Binary file not shown.
8 changes: 6 additions & 2 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.findProperty("sentryAndroidProject")?.toString()
}

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

Expand Down Expand Up @@ -46,8 +50,8 @@ android {
named("release") {
manifestPlaceholders["appIcon"] = "@mipmap/ic_launcher"

if (!file("${project.rootDir}/sentry.properties").exists()) {
println("WARNING: Sentry configuration file 'sentry.properties' not found. The ProGuard mapping files won't be uploaded.")
if (project.findProperty("sentryAndroidProject")?.toString().isNullOrBlank()) {
println("WARNING: Sentry configuration not found. The ProGuard mapping files won't be uploaded.")
}
}
}
Expand Down
8 changes: 8 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.findProperty("sentryAutomotiveProject")?.toString()
}

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

Expand All @@ -35,6 +39,10 @@ android {

named("release") {
manifestPlaceholders["appIcon"] = "@mipmap/ic_launcher"

if (project.findProperty("sentryAutomotiveProject")?.toString().isNullOrBlank()) {
println("WARNING: Sentry configuration not found. The ProGuard mapping files won't be uploaded.")
}
}
}

Expand Down
8 changes: 5 additions & 3 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.findProperty("sentryAuthToken")?.toString()
org = project.findProperty("sentryOrg")?.toString()

val shouldUploadDebugFiles = System.getenv()["CI"].toBoolean() &&
!project.properties["skipSentryProguardMappingUpload"]?.toString().toBoolean()
includeProguardMapping = shouldUploadDebugFiles
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", ""))
}
}
8 changes: 6 additions & 2 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.findProperty("sentryWearProject")?.toString()
}

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

Expand All @@ -32,8 +36,8 @@ android {
named("release") {
manifestPlaceholders["appIcon"] = "@mipmap/ic_launcher"

if (!file("${project.rootDir}/sentry.properties").exists()) {
println("WARNING: Sentry configuration file 'sentry.properties' not found. The ProGuard mapping files won't be uploaded.")
if (project.findProperty("sentryWearProject")?.toString().isNullOrBlank()) {
println("WARNING: Sentry configuration not found. The ProGuard mapping files won't be uploaded.")
}
}
}
Expand Down
Loading