-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
Conversation
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 8a4ce6f | 422.88 ms | 408.33 ms | -14.55 ms |
| 95aaf8a | 437.89 ms | 419.45 ms | -18.44 ms |
| 1bea095+dirty | 401.42 ms | 426.93 ms | 25.52 ms |
| c08359e | 421.87 ms | 445.37 ms | 23.50 ms |
| ba75c7c | 367.72 ms | 369.16 ms | 1.44 ms |
| 0b64753+dirty | 448.67 ms | 474.61 ms | 25.94 ms |
| bfe454a+dirty | 573.44 ms | 579.46 ms | 6.02 ms |
| 49ef936+dirty | 405.96 ms | 417.22 ms | 11.26 ms |
| a0b15d6 | 423.06 ms | 437.77 ms | 14.71 ms |
| c9e95bd | 428.04 ms | 458.70 ms | 30.65 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 8a4ce6f | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| 95aaf8a | 17.75 MiB | 19.68 MiB | 1.93 MiB |
| 1bea095+dirty | 17.75 MiB | 19.70 MiB | 1.95 MiB |
| c08359e | 17.75 MiB | 20.15 MiB | 2.41 MiB |
| ba75c7c | 17.75 MiB | 20.15 MiB | 2.41 MiB |
| 0b64753+dirty | 17.75 MiB | 19.70 MiB | 1.95 MiB |
| bfe454a+dirty | 17.75 MiB | 19.69 MiB | 1.94 MiB |
| 49ef936+dirty | 17.75 MiB | 19.69 MiB | 1.94 MiB |
| a0b15d6 | 17.75 MiB | 20.15 MiB | 2.41 MiB |
| c9e95bd | 17.75 MiB | 19.68 MiB | 1.93 MiB |
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 49ef936+dirty | 333.72 ms | 387.51 ms | 53.79 ms |
| 5526494+dirty | 380.79 ms | 432.70 ms | 51.91 ms |
| 3bd3f0d+dirty | 334.38 ms | 402.19 ms | 67.81 ms |
| 1853710+dirty | 360.67 ms | 396.28 ms | 35.61 ms |
| 8d89cc9+dirty | 357.69 ms | 415.79 ms | 58.10 ms |
| 000da7a+dirty | 347.89 ms | 381.98 ms | 34.09 ms |
| 6fee48d+dirty | 370.23 ms | 427.86 ms | 57.63 ms |
| c4e097a+dirty | 382.43 ms | 443.77 ms | 61.34 ms |
| c9e95bd+dirty | 339.32 ms | 401.24 ms | 61.92 ms |
| 6479fd5+dirty | 393.06 ms | 434.04 ms | 40.98 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 49ef936+dirty | 7.15 MiB | 8.42 MiB | 1.26 MiB |
| 5526494+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 3bd3f0d+dirty | 7.15 MiB | 8.43 MiB | 1.28 MiB |
| 1853710+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 8d89cc9+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 000da7a+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 6fee48d+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| c4e097a+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| c9e95bd+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 6479fd5+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d751a5d+dirty | 1212.22 ms | 1217.94 ms | 5.71 ms |
| 9f211e3+dirty | 1215.38 ms | 1218.15 ms | 2.77 ms |
| 785ffb1+dirty | 1213.71 ms | 1213.37 ms | -0.35 ms |
| 95aaf8a+dirty | 1206.83 ms | 1213.65 ms | 6.81 ms |
| c94a927+dirty | 1211.33 ms | 1223.31 ms | 11.97 ms |
| 98f632c+dirty | 1221.38 ms | 1229.26 ms | 7.88 ms |
| 459a438+dirty | 1218.39 ms | 1226.14 ms | 7.75 ms |
| 46bd012+dirty | 1231.78 ms | 1212.30 ms | -19.47 ms |
| 93137d1+dirty | 1232.69 ms | 1245.18 ms | 12.49 ms |
| 3e0a5f9+dirty | 1233.65 ms | 1239.10 ms | 5.45 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d751a5d+dirty | 3.19 MiB | 4.54 MiB | 1.36 MiB |
| 9f211e3+dirty | 3.19 MiB | 4.48 MiB | 1.29 MiB |
| 785ffb1+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
| 95aaf8a+dirty | 3.19 MiB | 4.44 MiB | 1.25 MiB |
| c94a927+dirty | 3.19 MiB | 4.56 MiB | 1.37 MiB |
| 98f632c+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
| 459a438+dirty | 3.19 MiB | 4.55 MiB | 1.36 MiB |
| 46bd012+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
| 93137d1+dirty | 3.19 MiB | 4.55 MiB | 1.37 MiB |
| 3e0a5f9+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d751a5d+dirty | 1215.57 ms | 1220.56 ms | 4.99 ms |
| 9f211e3+dirty | 1218.80 ms | 1233.88 ms | 15.08 ms |
| 785ffb1+dirty | 1237.63 ms | 1240.50 ms | 2.87 ms |
| 95aaf8a+dirty | 1234.78 ms | 1241.94 ms | 7.16 ms |
| c94a927+dirty | 1227.14 ms | 1239.64 ms | 12.50 ms |
| 98f632c+dirty | 1236.40 ms | 1241.62 ms | 5.22 ms |
| 459a438+dirty | 1222.12 ms | 1214.60 ms | -7.53 ms |
| 46bd012+dirty | 1220.49 ms | 1226.89 ms | 6.40 ms |
| 93137d1+dirty | 1230.73 ms | 1230.98 ms | 0.25 ms |
| 3e0a5f9+dirty | 1226.94 ms | 1230.02 ms | 3.08 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d751a5d+dirty | 2.63 MiB | 3.98 MiB | 1.34 MiB |
| 9f211e3+dirty | 2.63 MiB | 3.91 MiB | 1.28 MiB |
| 785ffb1+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
| 95aaf8a+dirty | 2.63 MiB | 3.87 MiB | 1.24 MiB |
| c94a927+dirty | 2.63 MiB | 3.99 MiB | 1.36 MiB |
| 98f632c+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
| 459a438+dirty | 2.63 MiB | 3.98 MiB | 1.35 MiB |
| 46bd012+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
| 93137d1+dirty | 2.63 MiB | 3.99 MiB | 1.35 MiB |
| 3e0a5f9+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
alwx
left a comment
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. |
antonis
left a comment
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.
LGTM 🚀
📢 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 areleasesmap anymore. The tasks are configured per-variant, omitting thedebugvariant.registerinstead ofcreateI tested it locally both
debugandreleasebuilds and thereact-native-legaljson 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
sendDefaultPIIis enabled🔮 Next steps