Add missing files in the Gradle wrapper directory#39145
Add missing files in the Gradle wrapper directory#39145blasten merged 9 commits intoflutter:masterfrom
Conversation
| Directory srcDir, | ||
| Directory destDir, | ||
| { | ||
| bool shouldCopyFile(File srcFile, File destFile), |
There was a problem hiding this comment.
rather than a callback closure, what if this instead was a optional boolean argument shouldOverwrite that defaulted to true?
There was a problem hiding this comment.
I thought about it. I ended up going with a callback because I see this as a generic utility--someone may want to filter based on other criteria.
| entity, | ||
| destDir.fileSystem.directory(newPath), | ||
| shouldCopyFile: shouldCopyFile, | ||
| onFileCopied: onFileCopied, |
There was a problem hiding this comment.
is onFileCopied supposed to be passed on to recursive calls? It seems in the old version it was not.
There was a problem hiding this comment.
Based on the original description of this function, it looks like it was a bug :)
097b4ce to
f6dfcd5
Compare
Codecov Report
@@ Coverage Diff @@
## master #39145 +/- ##
==========================================
+ Coverage 55.75% 57.08% +1.32%
==========================================
Files 195 195
Lines 18496 18502 +6
==========================================
+ Hits 10312 10561 +249
+ Misses 8184 7941 -243
Continue to review full report at Codecov.
|
Description
We currently assume that if
<app>/android/gradlewexists, then there's a wrapper andgradle-wrapper.properties. However, this isn't true in some cases. (This plugin for example: https://github.com/sroddy/flutter_string_encryption)Related Issues
Fixes #38691
Tests
I added the following tests:
Unit tests in
gradle_test.dartandfilesystem_test.dartChecklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?