Skip to content

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

Merged
merged 4 commits into from
Sep 16, 2019
Merged

Implement AAR size measurement. #805

merged 4 commits into from
Sep 16, 2019

Conversation

rlazo
Copy link
Collaborator

@rlazo rlazo commented Sep 16, 2019

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.

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`.
@googlebot googlebot added the cla: yes Override cla label Sep 16, 2019
@@ -30,7 +30,7 @@ android {
defaultConfig {
applicationId 'com.google.apksize'
minSdkVersion project.targetSdkVersion
multiDexEnabled true
multiDexEnabled true
Copy link
Contributor

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?

Copy link
Collaborator Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ignore these?

Copy link
Collaborator Author

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.

Copy link
Contributor

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?

Copy link
Collaborator Author

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!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. PTAL.

Copy link
Contributor

@yifanyang yifanyang left a 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
Copy link
Contributor

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?

Copy link
Collaborator Author

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) {
Copy link
Contributor

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?

Copy link
Collaborator Author

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed?

Copy link
Collaborator Author

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.

@google-oss-bot
Copy link
Contributor

@rlazo: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
check-changed 8cb0161 link /test check-changed
device-check-changed 8cb0161 link /test device-check-changed

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.

@rlazo rlazo merged commit aae1542 into master Sep 16, 2019
@rlazo rlazo deleted the rl.aar-size branch September 16, 2019 19:27
@firebase firebase locked and limited conversation to collaborators Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Override cla size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants