Skip to content

Conversation

@GaryQian
Copy link
Contributor

Tooling change to generate the encoding read by flutter/engine#24983

This encodes base loading units so that the download can be skipped and directly installed from local .so files.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 12, 2021
@google-cla google-cla bot added the cla: yes label Mar 12, 2021
@GaryQian GaryQian requested review from jonahwilliams and xster March 15, 2021 11:19
if (storedMappingString != encodedMapping) {
metaData.setAttribute('android:value', encodedMapping);
modified = true;
for (final XmlElement application in document.findAllElements('application')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This ensures that it only looks for metadata element under 'application', not any other element.

android:value="2" />
</application>
</manifest>
''', flush: true, mode: FileMode.append);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: don't append to an empty file (also don't need to flush)

);
final Directory baseModuleDir = env.projectDir.childDirectory('android').childDirectory('app');
final File manifest = baseModuleDir.childDirectory('src').childDirectory('main').childFile('AndroidManifest.xml');
if (manifest.existsSync()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the memory file system is created once for each test you shouldn't need to do this

validator.displayResults();
validator.attemptToolExit();

expect(logger.statusText.contains('Modified android files:\n'), true);
Copy link
Contributor

Choose a reason for hiding this comment

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

here and elsewhere, this will give better test errors:

Suggested change
expect(logger.statusText.contains('Modified android files:\n'), true);
expect(logger.statusText, contains('Modified android files:\n'));

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@fluttergithubbot fluttergithubbot merged commit 2a8b296 into flutter:master Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants