11import org.apache.tools.ant.taskdefs.condition.Os
22
3+ def config = project. hasProperty(" sentry" ) ? project. sentry : [];
4+
35gradle. projectsEvaluated {
46 def releases = [];
57 android. applicationVariants. each { variant ->
@@ -44,7 +46,7 @@ gradle.projectsEvaluated {
4446 bundleTask. setProperty(" commandLine" , cmd);
4547 bundleTask. setProperty(" args" , cmdArgs);
4648
47- if (project . hasProperty( " flavoraware " ) ) {
49+ if (config . flavorAware ) {
4850 println " **********************************"
4951 println " * Flavor aware sentry properties *"
5052 println " **********************************"
@@ -57,7 +59,7 @@ gradle.projectsEvaluated {
5759 description = " upload debug symbols to sentry"
5860
5961 def propertiesFile = " $reactRoot /android/sentry.properties" ;
60- if (project . hasProperty( " flavoraware " ) ) {
62+ if (config . flavorAware ) {
6163 propertiesFile = " $reactRoot /android/sentry-$variant " + " .properties"
6264 println " For $variant using: $propertiesFile "
6365 } else {
@@ -76,12 +78,12 @@ gradle.projectsEvaluated {
7678 def args = [
7779 cliExecutable
7880 ];
79- if (project . hasProperty( " sentryloglevel " ) ) {
81+ if (config . logLevel ) {
8082 args. push(" --log-level" );
81- args. push(sentryloglevel );
83+ args. push(config . logLevel );
8284 }
8385
84- if (project . hasProperty( " flavoraware " ) ) {
86+ if (config . flavorAware ) {
8587 args. push(" --url" );
8688 args. push(sentryProps. get(" defaults.url" ));
8789 args. push(" --auth-token" );
@@ -97,7 +99,7 @@ gradle.projectsEvaluated {
9799 args. push(" --release" );
98100 args. push(releaseName);
99101
100- if (project . hasProperty( " flavoraware " ) ) {
102+ if (config . flavorAware ) {
101103 args. push(" --org" );
102104 args. push(sentryProps. get(" defaults.org" ));
103105 args. push(" --project" );
@@ -109,7 +111,7 @@ gradle.projectsEvaluated {
109111 args. add(versionCode);
110112 }
111113
112- if (project . hasProperty( " sentryloglevel " ) ) {
114+ if (config . logLevel ) {
113115 println args
114116 }
115117 if (Os . isFamily(Os . FAMILY_WINDOWS )) {
0 commit comments