Skip to content

Commit

Permalink
fix: Check for gradle properties
Browse files Browse the repository at this point in the history
Fixes #257
  • Loading branch information
HazAT committed Oct 13, 2017
1 parent e80ac94 commit 0d2f193
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sentry.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ gradle.projectsEvaluated {
bundleTask.setProperty("commandLine", cmd);
bundleTask.setProperty("args", cmdArgs);

if (config.flavorAware) {
if (config.hasProperty("flavorAware") && config.flavorAware) {
println "**********************************"
println "* Flavor aware sentry properties *"
println "**********************************"
Expand Down Expand Up @@ -87,7 +87,7 @@ gradle.projectsEvaluated {
description = "upload debug symbols to sentry"

def propertiesFile = "$reactRoot/android/sentry.properties";
if (config.flavorAware) {
if (config.hasProperty("flavorAware") && config.flavorAware) {
propertiesFile = "$reactRoot/android/sentry-$variant"+".properties"
println "For $variant using: $propertiesFile"
} else {
Expand All @@ -106,12 +106,12 @@ gradle.projectsEvaluated {
def args = [
cliExecutable
];
if (config.logLevel) {
if (config.hasProperty("logLevel") && config.logLevel) {
args.push("--log-level");
args.push(config.logLevel);
}

if (config.flavorAware) {
if (config.hasProperty("flavorAware") && config.flavorAware) {
args.push("--url");
args.push(sentryProps.get("defaults.url"));
args.push("--auth-token");
Expand All @@ -127,7 +127,7 @@ gradle.projectsEvaluated {
args.push("--release");
args.push(releaseName);

if (config.flavorAware) {
if (config.hasProperty("flavorAware") && config.flavorAware) {
args.push("--org");
args.push(sentryProps.get("defaults.org"));
args.push("--project");
Expand All @@ -139,7 +139,7 @@ gradle.projectsEvaluated {
args.add(versionCode);
}

if (config.logLevel) {
if (config.hasProperty("logLevel") && config.logLevel) {
println args
}
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
Expand Down

0 comments on commit 0d2f193

Please sign in to comment.