Closed AndrewJack closed 7 years ago
Oops, good call, thanks for the report.
Using this as a workaround for now
apply from: 'sentry-switch-env.gradle'
def appModuleRootFolder = '.'
def sentryProperties = 'sentry.properties'
task switchToDogfood(type: Copy) {
def buildType = 'dogfood'
description = "Switches to $buildType sentry.properties"
from "$appModuleRootFolder/src/${buildType}"
include "$sentryProperties"
into "${rootProject.rootDir}"
}
task switchToRelease(type: Copy) {
def buildType = 'release'
description = "Switches to $buildType sentry.properties"
from "$appModuleRootFolder/src/${buildType}"
include "$sentryProperties"
into "${rootProject.rootDir}"
}
afterEvaluate {
persistSentryProguardUuidsForDogfood.dependsOn switchToDogfood
persistSentryProguardUuidsForRelease.dependsOn switchToRelease
}
@bretthoerner Do you support apk splits too? My build seems to work with it so far.
https://developer.android.com/studio/build/configure-apk-splits.html
I just did a local test, it seems to me that we already work with splits because it looks like Proguard runs for all source one time, we generate the UUID and drop the sentry-debug-meta.properties
file which is included in each .apk
. Update: I unpacked my split .apk
files and I see the properties file there, so I think we're all good?
Unrelated: have you sent a Sentry event with an .apk
built using our wrapper yet? I'm actually trying to debug a Proguard issue in production and I'm curious if it has been working (or not) for you. 😬
@bretthoerner Probably not i'm still setting it all up.
For what it's worth Proguard on Sentry SaaS is working, I'm looking into the build type thing now.
Could you add the ability to specify a sentry.properties file per buildType/Flavor?
In my case I have separate projects for each build type. e.g. dogfood & release sentry projects
Similar to how Google have implemented their
google-services
pluginBuild types
flavors & build types
https://developers.google.com/android/guides/google-services-plugin#adding_the_json_file