Skip to content

Commit

Permalink
fix(f&f): disable mapping file upload if credentials are not available (
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenrcs authored Oct 30, 2024
1 parent 392c215 commit e31c038
Showing 1 changed file with 15 additions and 13 deletions.
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
}
}

0 comments on commit e31c038

Please sign in to comment.