-
-
Notifications
You must be signed in to change notification settings - Fork 353
fix(gradle): Fix compatibility with react-native-legal #5253
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
base: main
Are you sure you want to change the base?
Conversation
Android (legacy) Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
77061ed+dirty | 369.55 ms | 408.35 ms | 38.80 ms |
a2bb688+dirty | 409.65 ms | 410.45 ms | 0.80 ms |
000da7a | 454.46 ms | 445.00 ms | -9.46 ms |
a0b15d6 | 423.06 ms | 437.77 ms | 14.71 ms |
af9331b | 449.77 ms | 479.20 ms | 29.43 ms |
69602ce | 417.47 ms | 443.52 ms | 26.05 ms |
7480abe+dirty | 411.60 ms | 405.81 ms | -5.78 ms |
8a4ce6f | 422.88 ms | 408.33 ms | -14.55 ms |
bc9680d | 375.15 ms | 401.12 ms | 25.97 ms |
46da307 | 455.92 ms | 443.79 ms | -12.13 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
77061ed+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
a2bb688+dirty | 17.75 MiB | 19.70 MiB | 1.95 MiB |
000da7a | 17.75 MiB | 19.68 MiB | 1.94 MiB |
a0b15d6 | 17.75 MiB | 20.15 MiB | 2.41 MiB |
af9331b | 17.75 MiB | 19.68 MiB | 1.94 MiB |
69602ce | 17.75 MiB | 19.68 MiB | 1.94 MiB |
7480abe+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
8a4ce6f | 17.75 MiB | 19.68 MiB | 1.94 MiB |
bc9680d | 17.75 MiB | 20.15 MiB | 2.41 MiB |
46da307 | 17.75 MiB | 19.68 MiB | 1.93 MiB |
Android (new) Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d751a5d+dirty | 341.61 ms | 403.06 ms | 61.45 ms |
69602ce+dirty | 375.37 ms | 405.28 ms | 29.91 ms |
77061ed+dirty | 359.40 ms | 424.10 ms | 64.70 ms |
98f632c+dirty | 323.98 ms | 375.39 ms | 51.41 ms |
eb07ba3+dirty | 419.49 ms | 482.12 ms | 62.63 ms |
7be1f99+dirty | 369.02 ms | 399.60 ms | 30.58 ms |
a0b15d6+dirty | 414.33 ms | 448.85 ms | 34.52 ms |
5c16cdc+dirty | 375.45 ms | 426.62 ms | 51.17 ms |
7480abe+dirty | 363.80 ms | 431.34 ms | 67.54 ms |
f70acbf+dirty | 520.12 ms | 558.91 ms | 38.79 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d751a5d+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
69602ce+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
77061ed+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
98f632c+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
eb07ba3+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
7be1f99+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
a0b15d6+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
5c16cdc+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
7480abe+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
f70acbf+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
iOS (new) Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
1bea095+dirty | 1218.93 ms | 1212.37 ms | -6.57 ms |
20daa0a+dirty | 1227.71 ms | 1233.72 ms | 6.01 ms |
ba75c7c+dirty | 1236.14 ms | 1240.69 ms | 4.55 ms |
6479fd5+dirty | 1207.80 ms | 1215.12 ms | 7.32 ms |
7480abe+dirty | 1219.84 ms | 1223.60 ms | 3.76 ms |
c4e097a+dirty | 1231.35 ms | 1246.91 ms | 15.56 ms |
69602ce+dirty | 1230.59 ms | 1230.84 ms | 0.24 ms |
d916aa3+dirty | 1211.02 ms | 1221.33 ms | 10.31 ms |
d751a5d+dirty | 1212.22 ms | 1217.94 ms | 5.71 ms |
955f2eb+dirty | 1225.78 ms | 1239.27 ms | 13.49 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
1bea095+dirty | 3.19 MiB | 4.55 MiB | 1.37 MiB |
20daa0a+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
ba75c7c+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
6479fd5+dirty | 3.19 MiB | 4.53 MiB | 1.35 MiB |
7480abe+dirty | 3.19 MiB | 4.53 MiB | 1.35 MiB |
c4e097a+dirty | 3.19 MiB | 4.44 MiB | 1.25 MiB |
69602ce+dirty | 3.19 MiB | 4.48 MiB | 1.29 MiB |
d916aa3+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
d751a5d+dirty | 3.19 MiB | 4.54 MiB | 1.36 MiB |
955f2eb+dirty | 3.19 MiB | 4.55 MiB | 1.36 MiB |
iOS (legacy) Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
1bea095+dirty | 1234.14 ms | 1233.96 ms | -0.18 ms |
20daa0a+dirty | 1233.12 ms | 1233.35 ms | 0.22 ms |
ba75c7c+dirty | 1235.86 ms | 1226.45 ms | -9.41 ms |
6479fd5+dirty | 1228.48 ms | 1231.32 ms | 2.84 ms |
7480abe+dirty | 1220.53 ms | 1244.18 ms | 23.65 ms |
c4e097a+dirty | 1229.09 ms | 1242.61 ms | 13.53 ms |
69602ce+dirty | 1235.65 ms | 1230.82 ms | -4.83 ms |
d916aa3+dirty | 1221.02 ms | 1228.98 ms | 7.96 ms |
d751a5d+dirty | 1215.57 ms | 1220.56 ms | 4.99 ms |
955f2eb+dirty | 1235.06 ms | 1253.88 ms | 18.81 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
1bea095+dirty | 2.63 MiB | 3.99 MiB | 1.35 MiB |
20daa0a+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
ba75c7c+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
6479fd5+dirty | 2.63 MiB | 3.96 MiB | 1.33 MiB |
7480abe+dirty | 2.63 MiB | 3.96 MiB | 1.33 MiB |
c4e097a+dirty | 2.63 MiB | 3.87 MiB | 1.24 MiB |
69602ce+dirty | 2.63 MiB | 3.91 MiB | 1.28 MiB |
d916aa3+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
d751a5d+dirty | 2.63 MiB | 3.98 MiB | 1.34 MiB |
955f2eb+dirty | 2.63 MiB | 3.98 MiB | 1.35 MiB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have just checked it — it works and solves the issue. Thanks a lot!
packages/core/sentry.gradle
Outdated
plugins.withId('com.android.application') { | ||
def ac = extensions.getByName("androidComponents") | ||
|
||
ac.onVariants(androidComponents.selector().all()) { v -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: v is the release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v is variant
, but since we have one down there already, I just named it v
Thank you for the PR! is it ready for review? |
@lucas-zimerman not yet, I will mark it as ready soonish, still sorting out some stuff |
14b894b
to
6decb5a
Compare
@lucas-zimerman this is ready for review now. |
📢 Type of change
📜 Description
afterEvaluate
(which is too late to register tasks) intoandroidComponents.onVariants
. Since our tasks only run when there's an android app being build, it's a good place to hook our logic into. It also gives us direct access to the variant, so we don't have to search for it and build areleases
map anymore. The tasks are configured per-variant, omitting thedebug
variant.register
instead ofcreate
I tested it locally both
debug
andrelease
builds and thereact-native-legal
json file is correctly generated in both cases. Also, our tasks run correctly for the release build, you can see here I uploaded sourcemaps: https://sentry-sdks.sentry.io/settings/projects/sentry-react-native/source-maps/23317267-0d24-5f07-9852-28630b8cf98a/The only thing that probably needs more testing is modules collection, because it generated an empty json locally for me, but perhaps I was doing something unexpected, because I was running gradle builds directly as opposed calling
yarn/npx
. If someone could verify it works, that'd be great.💡 Motivation and Context
Closes #5236
💚 How did you test it?
manually
📝 Checklist
sendDefaultPII
is enabled🔮 Next steps