Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(f&f): disable mapping file upload if credentials are not available #59

Merged
merged 1 commit into from
Oct 30, 2024
Merged
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
28 changes: 15 additions & 13 deletions CSSampleApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ android {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// Set credentials from different source, fallback on Github CI --> see android-ci.yml
errorAnalysisCrash {
uploadCredentials {
// from gradle.properties
projectId = project.findProperty("SAMPLE_PROJECT_ID")?.toInteger() ?:
System.getenv("SAMPLE_PROJECT_ID")?.toInteger()
// from local.properties
clientId = getLocalProperty("SAMPLE_MAPPING_UPLOAD_CLIENT_ID") ?:
System.getenv("SAMPLE_MAPPING_UPLOAD_CLIENT_ID")
// from environment variable, is the same than Github CI here
clientSecret = System.getenv("SAMPLE_MAPPING_UPLOAD_CLIENT_SECRET") ?: ""
}
}
errorAnalysisCrash {
uploadCredentials {
mappingFileUploadEnabled = getLocalProperty("SAMPLE_MAPPING_UPLOAD_CLIENT_ID") ?:
System.getenv("SAMPLE_MAPPING_UPLOAD_CLIENT_ID") != null
// from gradle.properties
projectId = project.findProperty("SAMPLE_PROJECT_ID")?.toInteger() ?:
System.getenv("SAMPLE_PROJECT_ID")?.toInteger()
// from local.properties
clientId = getLocalProperty("SAMPLE_MAPPING_UPLOAD_CLIENT_ID") ?:
System.getenv("SAMPLE_MAPPING_UPLOAD_CLIENT_ID")
// from environment variable, is the same than Github CI here
clientSecret = System.getenv("SAMPLE_MAPPING_UPLOAD_CLIENT_SECRET") ?: ""
}
}
}
}

Expand Down Expand Up @@ -99,4 +101,4 @@ def getLocalProperty(clientIdProp) {
return localProperties.getProperty(clientIdProp)
}
return null
}
}
Loading