1
1
import org.apache.tools.ant.taskdefs.condition.Os
2
2
3
+ def config = project. hasProperty(" sentry" ) ? project. sentry : [];
4
+
3
5
gradle. projectsEvaluated {
4
6
def releases = [];
5
7
android. applicationVariants. each { variant ->
@@ -44,7 +46,7 @@ gradle.projectsEvaluated {
44
46
bundleTask. setProperty(" commandLine" , cmd);
45
47
bundleTask. setProperty(" args" , cmdArgs);
46
48
47
- if (project . hasProperty( " flavoraware " ) ) {
49
+ if (config . flavorAware ) {
48
50
println " **********************************"
49
51
println " * Flavor aware sentry properties *"
50
52
println " **********************************"
@@ -57,7 +59,7 @@ gradle.projectsEvaluated {
57
59
description = " upload debug symbols to sentry"
58
60
59
61
def propertiesFile = " $reactRoot /android/sentry.properties" ;
60
- if (project . hasProperty( " flavoraware " ) ) {
62
+ if (config . flavorAware ) {
61
63
propertiesFile = " $reactRoot /android/sentry-$variant " + " .properties"
62
64
println " For $variant using: $propertiesFile "
63
65
} else {
@@ -76,12 +78,12 @@ gradle.projectsEvaluated {
76
78
def args = [
77
79
cliExecutable
78
80
];
79
- if (project . hasProperty( " sentryloglevel " ) ) {
81
+ if (config . logLevel ) {
80
82
args. push(" --log-level" );
81
- args. push(sentryloglevel );
83
+ args. push(config . logLevel );
82
84
}
83
85
84
- if (project . hasProperty( " flavoraware " ) ) {
86
+ if (config . flavorAware ) {
85
87
args. push(" --url" );
86
88
args. push(sentryProps. get(" defaults.url" ));
87
89
args. push(" --auth-token" );
@@ -97,7 +99,7 @@ gradle.projectsEvaluated {
97
99
args. push(" --release" );
98
100
args. push(releaseName);
99
101
100
- if (project . hasProperty( " flavoraware " ) ) {
102
+ if (config . flavorAware ) {
101
103
args. push(" --org" );
102
104
args. push(sentryProps. get(" defaults.org" ));
103
105
args. push(" --project" );
@@ -109,7 +111,7 @@ gradle.projectsEvaluated {
109
111
args. add(versionCode);
110
112
}
111
113
112
- if (project . hasProperty( " sentryloglevel " ) ) {
114
+ if (config . logLevel ) {
113
115
println args
114
116
}
115
117
if (Os . isFamily(Os . FAMILY_WINDOWS )) {
0 commit comments