Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
81e1f7d1
Unverified
Commit
81e1f7d1
authored
Dec 03, 2020
by
Jonah Williams
Committed by
GitHub
Dec 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] mode code size output to ~/.flutter-devtools (#71601)
parent
ece72384
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
7 deletions
+23
-7
gradle.dart
packages/flutter_tools/lib/src/android/gradle.dart
+3
-1
file_system.dart
packages/flutter_tools/lib/src/base/file_system.dart
+1
-0
build_ios.dart
packages/flutter_tools/lib/src/commands/build_ios.dart
+3
-1
build_linux.dart
packages/flutter_tools/lib/src/linux/build_linux.dart
+3
-1
build_macos.dart
packages/flutter_tools/lib/src/macos/build_macos.dart
+3
-1
build_windows.dart
packages/flutter_tools/lib/src/windows/build_windows.dart
+3
-1
build_ipa_test.dart
...er_tools/test/commands.shard/hermetic/build_ipa_test.dart
+1
-0
build_linux_test.dart
..._tools/test/commands.shard/hermetic/build_linux_test.dart
+2
-1
build_macos_test.dart
..._tools/test/commands.shard/hermetic/build_macos_test.dart
+2
-1
build_windows_test.dart
...ools/test/commands.shard/hermetic/build_windows_test.dart
+1
-0
analyze_size_test.dart
...utter_tools/test/integration.shard/analyze_size_test.dart
+1
-0
No files found.
packages/flutter_tools/lib/src/android/gradle.dart
View file @
81e1f7d1
...
...
@@ -532,7 +532,9 @@ Future<void> _performCodeSizeAnalysis(
kind:
kind
,
);
final
File
outputFile
=
globals
.
fsUtils
.
getUniqueFile
(
globals
.
fs
.
directory
(
getBuildDirectory
()),
'
$kind
-code-size-analysis'
,
'json'
,
globals
.
fs
.
directory
(
globals
.
fsUtils
.
homeDirPath
)
.
childDirectory
(
'.flutter-devtools'
),
'
$kind
-code-size-analysis'
,
'json'
,
)..
writeAsStringSync
(
jsonEncode
(
output
));
// This message is used as a sentinel in analyze_apk_size_test.dart
globals
.
printStatus
(
...
...
packages/flutter_tools/lib/src/base/file_system.dart
View file @
81e1f7d1
...
...
@@ -103,6 +103,7 @@ class FileSystemUtils {
final
String
name
=
'
${baseName}
_
${i.toString().padLeft(2, '0')}
.
$ext
'
;
final
File
file
=
fs
.
file
(
_fileSystem
.
path
.
join
(
dir
.
path
,
name
));
if
(!
file
.
existsSync
())
{
file
.
createSync
(
recursive:
true
);
return
file
;
}
i
+=
1
;
...
...
packages/flutter_tools/lib/src/commands/build_ios.dart
View file @
81e1f7d1
...
...
@@ -286,7 +286,9 @@ abstract class _BuildIOSSubCommand extends BuildSubCommand {
type:
'ios'
,
);
final
File
outputFile
=
globals
.
fsUtils
.
getUniqueFile
(
globals
.
fs
.
directory
(
getBuildDirectory
()),
'ios-code-size-analysis'
,
'json'
,
globals
.
fs
.
directory
(
globals
.
fsUtils
.
homeDirPath
)
.
childDirectory
(
'.flutter-devtools'
),
'ios-code-size-analysis'
,
'json'
,
)..
writeAsStringSync
(
jsonEncode
(
output
));
// This message is used as a sentinel in analyze_apk_size_test.dart
globals
.
printStatus
(
...
...
packages/flutter_tools/lib/src/linux/build_linux.dart
View file @
81e1f7d1
...
...
@@ -70,7 +70,9 @@ Future<void> buildLinux(
type:
'linux'
,
);
final
File
outputFile
=
globals
.
fsUtils
.
getUniqueFile
(
globals
.
fs
.
directory
(
getBuildDirectory
()),
'linux-code-size-analysis'
,
'json'
,
globals
.
fs
.
directory
(
globals
.
fsUtils
.
homeDirPath
)
.
childDirectory
(
'.flutter-devtools'
),
'linux-code-size-analysis'
,
'json'
,
)..
writeAsStringSync
(
jsonEncode
(
output
));
// This message is used as a sentinel in analyze_apk_size_test.dart
globals
.
printStatus
(
...
...
packages/flutter_tools/lib/src/macos/build_macos.dart
View file @
81e1f7d1
...
...
@@ -133,7 +133,9 @@ Future<void> buildMacOS({
excludePath:
'Versions'
,
// Avoid double counting caused by symlinks
);
final
File
outputFile
=
globals
.
fsUtils
.
getUniqueFile
(
globals
.
fs
.
directory
(
getBuildDirectory
()),
'macos-code-size-analysis'
,
'json'
,
globals
.
fs
.
directory
(
globals
.
fsUtils
.
homeDirPath
)
.
childDirectory
(
'.flutter-devtools'
),
'macos-code-size-analysis'
,
'json'
,
)..
writeAsStringSync
(
jsonEncode
(
output
));
// This message is used as a sentinel in analyze_apk_size_test.dart
globals
.
printStatus
(
...
...
packages/flutter_tools/lib/src/windows/build_windows.dart
View file @
81e1f7d1
...
...
@@ -78,7 +78,9 @@ Future<void> buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, {
type:
'windows'
,
);
final
File
outputFile
=
globals
.
fsUtils
.
getUniqueFile
(
globals
.
fs
.
directory
(
getBuildDirectory
()),
'windows-code-size-analysis'
,
'json'
,
globals
.
fs
.
directory
(
globals
.
fsUtils
.
homeDirPath
)
.
childDirectory
(
'.flutter-devtools'
),
'windows-code-size-analysis'
,
'json'
,
)..
writeAsStringSync
(
jsonEncode
(
output
));
// This message is used as a sentinel in analyze_apk_size_test.dart
globals
.
printStatus
(
...
...
packages/flutter_tools/test/commands.shard/hermetic/build_ipa_test.dart
View file @
81e1f7d1
...
...
@@ -34,6 +34,7 @@ final Platform macosPlatform = FakePlatform(
operatingSystem:
'macos'
,
environment:
<
String
,
String
>{
'FLUTTER_ROOT'
:
'/'
,
'HOME'
:
'/'
,
}
);
final
Platform
notMacosPlatform
=
FakePlatform
(
...
...
packages/flutter_tools/test/commands.shard/hermetic/build_linux_test.dart
View file @
81e1f7d1
...
...
@@ -26,7 +26,8 @@ const String _kTestFlutterRoot = '/flutter';
final
Platform
linuxPlatform
=
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{
'FLUTTER_ROOT'
:
_kTestFlutterRoot
'FLUTTER_ROOT'
:
_kTestFlutterRoot
,
'HOME'
:
'/'
,
}
);
final
Platform
notLinuxPlatform
=
FakePlatform
(
...
...
packages/flutter_tools/test/commands.shard/hermetic/build_macos_test.dart
View file @
81e1f7d1
...
...
@@ -26,7 +26,7 @@ import '../../src/testbed.dart';
class
FakeXcodeProjectInterpreterWithProfile
extends
FakeXcodeProjectInterpreter
{
@override
Future
<
XcodeProjectInfo
>
getInfo
(
String
projectPath
,
{
String
projectFilename
})
async
{
Future
<
XcodeProjectInfo
>
getInfo
(
String
projectPath
,
{
String
projectFilename
})
async
{
return
XcodeProjectInfo
(
<
String
>[
'Runner'
],
<
String
>[
'Debug'
,
'Profile'
,
'Release'
],
...
...
@@ -40,6 +40,7 @@ final Platform macosPlatform = FakePlatform(
operatingSystem:
'macos'
,
environment:
<
String
,
String
>{
'FLUTTER_ROOT'
:
'/'
,
'HOME'
:
'/'
,
}
);
final
Platform
notMacosPlatform
=
FakePlatform
(
...
...
packages/flutter_tools/test/commands.shard/hermetic/build_windows_test.dart
View file @
81e1f7d1
...
...
@@ -28,6 +28,7 @@ final Platform windowsPlatform = FakePlatform(
environment:
<
String
,
String
>{
'PROGRAMFILES(X86)'
:
r'C:\Program Files (x86)\'
,
'FLUTTER_ROOT'
:
flutterRoot
,
'USERPROFILE'
:
'/'
,
}
);
final
Platform
notWindowsPlatform
=
FakePlatform
(
...
...
packages/flutter_tools/test/integration.shard/analyze_size_test.dart
View file @
81e1f7d1
...
...
@@ -34,6 +34,7 @@ void main() {
final
String
outputFilePath
=
line
.
split
(
apkDebugMessage
).
last
.
trim
();
expect
(
fileSystem
.
file
(
fileSystem
.
path
.
join
(
woringDirectory
,
outputFilePath
)),
exists
);
expect
(
outputFilePath
,
contains
(
'.flutter-devtools'
));
expect
(
result
.
exitCode
,
0
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment