-
Notifications
You must be signed in to change notification settings - Fork 625
Implement AAR size measurement. #805
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
The new task `generateAarSizeMeasurements` generates either a table or a JSON report with the size, in bytes, of the release AAR generated by each subproject. It follows the same logic, and has the same flags, as `generateApkSizeMeasurements`.
@@ -30,7 +30,7 @@ android { | |||
defaultConfig { | |||
applicationId 'com.google.apksize' | |||
minSdkVersion project.targetSdkVersion | |||
multiDexEnabled true | |||
multiDexEnabled true |
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.
Should this be aligned with the other lines?
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.
Done.
@@ -0,0 +1,5 @@ | |||
firebase-database-collection |
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.
Why ignore these?
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.
@vkryachko can confirm, but I have the impression that these are not actual sdks, but more like helper code or backend, so I wouldn't like to include those in the report.
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.
It would still be beneficial to know their sizes, don't you think?
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.
You're right. I've talked about this with @yifanyang too and agreed that I can report all the numbers. I'll update the PR accordingly. Thanks!
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.
Done. PTAL.
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.
A few comments, but largely looks good!
Nested projects are now correctly supported, naming them including the parent project, like `firebase-functions:ktx` instead of `ktx`.
* Generates size measurements after building the release aar's. | ||
* | ||
* <p>This task can run in two modes. The first mode, enabled when running the task with the | ||
* {@code pull_request} flag set, is a dependency of {@linkUploadMeasurementsTask} and generates |
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.
Missing a space between @link
and Upload
?
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.
Good catch!
@@ -42,6 +42,15 @@ task generateApkSizeMeasurements(type: GenerateMeasurementsTask) { | |||
reportFile = file("$buildDir/size-report.json") | |||
} | |||
|
|||
task generateAarSizeMeasurements(type: com.google.firebase.gradle.plugins.measurement.aarsize.GenerateMeasurementsTask) { |
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.
I'm not an expert of groovy. Does it support import aliases like python or typescript?
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.
I didn't know either, but it does. Fixed!
@@ -25,7 +25,7 @@ apply from: "src/config/config.gradle" | |||
apply from: "src/database/database.gradle" | |||
apply from: "src/firestore/firestore.gradle" | |||
apply from: "src/functions/functions.gradle" | |||
apply from: "src/inappmessagingdisplay/inappmessaging-display.gradle" | |||
// apply from: "src/inappmessagingdisplay/inappmessaging-display.gradle" |
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.
Is this still needed?
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.
It is. I commented it out during testing. Fixed.
@rlazo: The following tests failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
The new task
generateAarSizeMeasurements
generates either a table or a JSON report with the size, in bytes, of the release AAR generated by each subproject. It follows the same logic, and has the same flags, asgenerateApkSizeMeasurements
.