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
be2c68c8
Unverified
Commit
be2c68c8
authored
Apr 09, 2021
by
Jonah Williams
Committed by
GitHub
Apr 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] cache for UWP artifacts (#80069)
parent
bd96a8f9
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
107 additions
and
23 deletions
+107
-23
tool_backend.dart
packages/flutter_tools/bin/tool_backend.dart
+1
-1
artifacts.dart
packages/flutter_tools/lib/src/artifacts.dart
+17
-13
build.dart
packages/flutter_tools/lib/src/base/build.dart
+1
-0
build_info.dart
packages/flutter_tools/lib/src/build_info.dart
+2
-0
windows.dart
...s/flutter_tools/lib/src/build_system/targets/windows.dart
+3
-6
cache.dart
packages/flutter_tools/lib/src/cache.dart
+4
-0
build_winuwp.dart
packages/flutter_tools/lib/src/commands/build_winuwp.dart
+1
-2
precache.dart
packages/flutter_tools/lib/src/commands/precache.dart
+2
-0
flutter_cache.dart
packages/flutter_tools/lib/src/flutter_cache.dart
+35
-0
artifacts_test.dart
...ages/flutter_tools/test/general.shard/artifacts_test.dart
+26
-0
windows_test.dart
...test/general.shard/build_system/targets/windows_test.dart
+1
-1
cache_test.dart
packages/flutter_tools/test/general.shard/cache_test.dart
+14
-0
No files found.
packages/flutter_tools/bin/tool_backend.dart
View file @
be2c68c8
...
@@ -62,7 +62,7 @@ or
...
@@ -62,7 +62,7 @@ or
'flutter'
'flutter'
]);
]);
final
bool
uwp
=
targetPlatform
.
contains
(
'uwp'
);
final
bool
uwp
=
targetPlatform
.
contains
(
'uwp'
);
final
String
bundlePlatform
=
targetPlatform
.
startsWith
(
'windows
-x64
'
)
?
'windows'
:
targetPlatform
;
final
String
bundlePlatform
=
targetPlatform
.
startsWith
(
'windows'
)
?
'windows'
:
targetPlatform
;
final
String
target
=
'
${buildMode}
_bundle_
${bundlePlatform}
_assets
${uwp ? '_uwp' : ''}
'
;
final
String
target
=
'
${buildMode}
_bundle_
${bundlePlatform}
_assets
${uwp ? '_uwp' : ''}
'
;
final
Process
assembleProcess
=
await
Process
.
start
(
final
Process
assembleProcess
=
await
Process
.
start
(
flutterExecutable
,
flutterExecutable
,
...
...
packages/flutter_tools/lib/src/artifacts.dart
View file @
be2c68c8
...
@@ -74,8 +74,10 @@ enum Artifact {
...
@@ -74,8 +74,10 @@ enum Artifact {
linuxHeaders
,
linuxHeaders
,
/// The root of the Windows desktop sources.
/// The root of the Windows desktop sources.
windowsDesktopPath
,
windowsDesktopPath
,
/// The root of the cpp client code for Windows desktop.
/// The root of the cpp client code for Windows desktop
and Windows UWP desktop
.
windowsCppClientWrapper
,
windowsCppClientWrapper
,
/// The root of the Windows UWP desktop sources.
windowsUwpDesktopPath
,
/// The root of the sky_engine package.
/// The root of the sky_engine package.
skyEnginePath
,
skyEnginePath
,
/// The location of the macOS engine podspec file.
/// The location of the macOS engine podspec file.
...
@@ -146,10 +148,11 @@ String _artifactToFileName(Artifact artifact, [ TargetPlatform platform, BuildMo
...
@@ -146,10 +148,11 @@ String _artifactToFileName(Artifact artifact, [ TargetPlatform platform, BuildMo
return
''
;
return
''
;
case
Artifact
.
linuxHeaders
:
case
Artifact
.
linuxHeaders
:
return
'flutter_linux'
;
return
'flutter_linux'
;
case
Artifact
.
windowsDesktopPath
:
return
''
;
case
Artifact
.
windowsCppClientWrapper
:
case
Artifact
.
windowsCppClientWrapper
:
return
'cpp_client_wrapper'
;
return
'cpp_client_wrapper'
;
case
Artifact
.
windowsUwpDesktopPath
:
case
Artifact
.
windowsDesktopPath
:
return
''
;
case
Artifact
.
skyEnginePath
:
case
Artifact
.
skyEnginePath
:
return
'sky_engine'
;
return
'sky_engine'
;
case
Artifact
.
flutterMacOSPodspec
:
case
Artifact
.
flutterMacOSPodspec
:
...
@@ -284,6 +287,7 @@ class CachedArtifacts implements Artifacts {
...
@@ -284,6 +287,7 @@ class CachedArtifacts implements Artifacts {
case
TargetPlatform
.
linux_x64
:
case
TargetPlatform
.
linux_x64
:
case
TargetPlatform
.
linux_arm64
:
case
TargetPlatform
.
linux_arm64
:
case
TargetPlatform
.
windows_x64
:
case
TargetPlatform
.
windows_x64
:
case
TargetPlatform
.
windows_uwp_x64
:
return
_getDesktopArtifactPath
(
artifact
,
platform
,
mode
);
return
_getDesktopArtifactPath
(
artifact
,
platform
,
mode
);
case
TargetPlatform
.
fuchsia_arm64
:
case
TargetPlatform
.
fuchsia_arm64
:
case
TargetPlatform
.
fuchsia_x64
:
case
TargetPlatform
.
fuchsia_x64
:
...
@@ -444,6 +448,9 @@ class CachedArtifacts implements Artifacts {
...
@@ -444,6 +448,9 @@ class CachedArtifacts implements Artifacts {
}
}
final
String
engineArtifactsPath
=
_cache
.
getArtifactDirectory
(
'engine'
).
path
;
final
String
engineArtifactsPath
=
_cache
.
getArtifactDirectory
(
'engine'
).
path
;
return
_fileSystem
.
path
.
join
(
engineArtifactsPath
,
platformDirName
,
_artifactToFileName
(
artifact
,
platform
,
mode
));
return
_fileSystem
.
path
.
join
(
engineArtifactsPath
,
platformDirName
,
_artifactToFileName
(
artifact
,
platform
,
mode
));
case
Artifact
.
windowsUwpDesktopPath
:
final
String
engineArtifactsPath
=
_cache
.
getArtifactDirectory
(
'engine'
).
path
;
return
_fileSystem
.
path
.
join
(
engineArtifactsPath
,
'windows-uwp-x64-
${getNameForBuildMode(mode)}
'
,
_artifactToFileName
(
artifact
,
platform
,
mode
));
case
Artifact
.
windowsCppClientWrapper
:
case
Artifact
.
windowsCppClientWrapper
:
final
String
engineArtifactsPath
=
_cache
.
getArtifactDirectory
(
'engine'
).
path
;
final
String
engineArtifactsPath
=
_cache
.
getArtifactDirectory
(
'engine'
).
path
;
return
_fileSystem
.
path
.
join
(
engineArtifactsPath
,
'windows-x64'
,
_artifactToFileName
(
artifact
,
platform
,
mode
));
return
_fileSystem
.
path
.
join
(
engineArtifactsPath
,
'windows-x64'
,
_artifactToFileName
(
artifact
,
platform
,
mode
));
...
@@ -515,15 +522,13 @@ class CachedArtifacts implements Artifacts {
...
@@ -515,15 +522,13 @@ class CachedArtifacts implements Artifacts {
case
TargetPlatform
.
android_arm64
:
case
TargetPlatform
.
android_arm64
:
case
TargetPlatform
.
android_x64
:
case
TargetPlatform
.
android_x64
:
case
TargetPlatform
.
android_x86
:
case
TargetPlatform
.
android_x86
:
case
TargetPlatform
.
windows_uwp_x64
:
assert
(
mode
!=
null
,
'Need to specify a build mode for platform
$platform
.'
);
assert
(
mode
!=
null
,
'Need to specify a build mode for platform
$platform
.'
);
final
String
suffix
=
mode
!=
BuildMode
.
debug
?
'-
${snakeCase(getModeName(mode), '-')}
'
:
''
;
final
String
suffix
=
mode
!=
BuildMode
.
debug
?
'-
${snakeCase(getModeName(mode), '-')}
'
:
''
;
return
_fileSystem
.
path
.
join
(
engineDir
,
platformName
+
suffix
);
return
_fileSystem
.
path
.
join
(
engineDir
,
platformName
+
suffix
);
case
TargetPlatform
.
android
:
case
TargetPlatform
.
android
:
assert
(
false
,
'cannot use TargetPlatform.android to look up artifacts'
);
assert
(
false
,
'cannot use TargetPlatform.android to look up artifacts'
);
return
null
;
return
null
;
case
TargetPlatform
.
windows_uwp_x64
:
assert
(
false
,
'cannot use TargetPlatform.windows_uwp_x64 to look up artifacts'
);
return
null
;
}
}
assert
(
false
,
'Invalid platform
$platform
.'
);
assert
(
false
,
'Invalid platform
$platform
.'
);
return
null
;
return
null
;
...
@@ -679,13 +684,6 @@ class CachedLocalEngineArtifacts implements LocalEngineArtifacts {
...
@@ -679,13 +684,6 @@ class CachedLocalEngineArtifacts implements LocalEngineArtifacts {
return
_cache
.
getArtifactDirectory
(
'ios-deploy'
).
childFile
(
artifactFileName
).
path
;
return
_cache
.
getArtifactDirectory
(
'ios-deploy'
).
childFile
(
artifactFileName
).
path
;
case
Artifact
.
iproxy
:
case
Artifact
.
iproxy
:
return
_cache
.
getArtifactDirectory
(
'usbmuxd'
).
childFile
(
artifactFileName
).
path
;
return
_cache
.
getArtifactDirectory
(
'usbmuxd'
).
childFile
(
artifactFileName
).
path
;
case
Artifact
.
linuxDesktopPath
:
case
Artifact
.
linuxHeaders
:
return
_fileSystem
.
path
.
join
(
_hostEngineOutPath
,
artifactFileName
);
case
Artifact
.
windowsDesktopPath
:
return
_fileSystem
.
path
.
join
(
_hostEngineOutPath
,
artifactFileName
);
case
Artifact
.
windowsCppClientWrapper
:
return
_fileSystem
.
path
.
join
(
_hostEngineOutPath
,
artifactFileName
);
case
Artifact
.
skyEnginePath
:
case
Artifact
.
skyEnginePath
:
return
_fileSystem
.
path
.
join
(
_hostEngineOutPath
,
'gen'
,
'dart-pkg'
,
artifactFileName
);
return
_fileSystem
.
path
.
join
(
_hostEngineOutPath
,
'gen'
,
'dart-pkg'
,
artifactFileName
);
case
Artifact
.
flutterMacOSPodspec
:
case
Artifact
.
flutterMacOSPodspec
:
...
@@ -735,6 +733,12 @@ class CachedLocalEngineArtifacts implements LocalEngineArtifacts {
...
@@ -735,6 +733,12 @@ class CachedLocalEngineArtifacts implements LocalEngineArtifacts {
return
_fileSystem
.
path
.
join
(
_getFlutterWebSdkPath
(),
'kernel'
,
'amd-canvaskit-html-sound'
,
artifactFileName
);
return
_fileSystem
.
path
.
join
(
_getFlutterWebSdkPath
(),
'kernel'
,
'amd-canvaskit-html-sound'
,
artifactFileName
);
case
Artifact
.
pubExecutable
:
case
Artifact
.
pubExecutable
:
return
_fileSystem
.
path
.
join
(
_hostEngineOutPath
,
'dart-sdk'
,
'bin'
,
_artifactToFileName
(
artifact
,
platform
,
mode
));
return
_fileSystem
.
path
.
join
(
_hostEngineOutPath
,
'dart-sdk'
,
'bin'
,
_artifactToFileName
(
artifact
,
platform
,
mode
));
case
Artifact
.
windowsUwpDesktopPath
:
case
Artifact
.
linuxDesktopPath
:
case
Artifact
.
linuxHeaders
:
case
Artifact
.
windowsDesktopPath
:
case
Artifact
.
windowsCppClientWrapper
:
return
_fileSystem
.
path
.
join
(
_hostEngineOutPath
,
artifactFileName
);
}
}
assert
(
false
,
'Invalid artifact
$artifact
.'
);
assert
(
false
,
'Invalid artifact
$artifact
.'
);
return
null
;
return
null
;
...
...
packages/flutter_tools/lib/src/base/build.dart
View file @
be2c68c8
...
@@ -315,6 +315,7 @@ class AOTSnapshotter {
...
@@ -315,6 +315,7 @@ class AOTSnapshotter {
TargetPlatform
.
linux_x64
,
TargetPlatform
.
linux_x64
,
TargetPlatform
.
linux_arm64
,
TargetPlatform
.
linux_arm64
,
TargetPlatform
.
windows_x64
,
TargetPlatform
.
windows_x64
,
TargetPlatform
.
windows_uwp_x64
,
].
contains
(
platform
);
].
contains
(
platform
);
}
}
}
}
packages/flutter_tools/lib/src/build_info.dart
View file @
be2c68c8
...
@@ -600,6 +600,8 @@ TargetPlatform? getTargetPlatformForName(String platform) {
...
@@ -600,6 +600,8 @@ TargetPlatform? getTargetPlatformForName(String platform) {
return
TargetPlatform
.
linux_arm64
;
return
TargetPlatform
.
linux_arm64
;
case
'windows-x64'
:
case
'windows-x64'
:
return
TargetPlatform
.
windows_x64
;
return
TargetPlatform
.
windows_x64
;
case
'windows-uwp-x64'
:
return
TargetPlatform
.
windows_uwp_x64
;
case
'web-javascript'
:
case
'web-javascript'
:
return
TargetPlatform
.
web_javascript
;
return
TargetPlatform
.
web_javascript
;
}
}
...
...
packages/flutter_tools/lib/src/build_system/targets/windows.dart
View file @
be2c68c8
...
@@ -133,12 +133,10 @@ class UnpackWindowsUwp extends Target {
...
@@ -133,12 +133,10 @@ class UnpackWindowsUwp extends Target {
@override
@override
Future
<
void
>
build
(
Environment
environment
)
async
{
Future
<
void
>
build
(
Environment
environment
)
async
{
// These artifact look ups need to modified to windows-x64-uwp once
// the cache updates have landed.
final
BuildMode
buildMode
=
getBuildModeForName
(
environment
.
defines
[
kBuildMode
]);
final
BuildMode
buildMode
=
getBuildModeForName
(
environment
.
defines
[
kBuildMode
]);
final
String
engineSourcePath
=
environment
.
artifacts
final
String
engineSourcePath
=
environment
.
artifacts
.
getArtifactPath
(
.
getArtifactPath
(
Artifact
.
windowsDesktopPath
,
Artifact
.
windows
Uwp
DesktopPath
,
platform:
TargetPlatform
.
windows_x64
,
platform:
TargetPlatform
.
windows_x64
,
mode:
buildMode
,
mode:
buildMode
,
);
);
...
@@ -338,7 +336,6 @@ class DebugBundleWindowsAssets extends BundleWindowsAssets {
...
@@ -338,7 +336,6 @@ class DebugBundleWindowsAssets extends BundleWindowsAssets {
];
];
}
}
class
ReleaseBundleWindowsAssetsUwp
extends
BundleWindowsAssetsUwp
{
class
ReleaseBundleWindowsAssetsUwp
extends
BundleWindowsAssetsUwp
{
const
ReleaseBundleWindowsAssetsUwp
();
const
ReleaseBundleWindowsAssetsUwp
();
...
@@ -351,7 +348,7 @@ class ReleaseBundleWindowsAssetsUwp extends BundleWindowsAssetsUwp {
...
@@ -351,7 +348,7 @@ class ReleaseBundleWindowsAssetsUwp extends BundleWindowsAssetsUwp {
@override
@override
List
<
Target
>
get
dependencies
=>
<
Target
>[
List
<
Target
>
get
dependencies
=>
<
Target
>[
...
super
.
dependencies
,
...
super
.
dependencies
,
const
WindowsAotBundle
(
AotElfRelease
(
TargetPlatform
.
windows_x64
)),
const
WindowsAotBundle
(
AotElfRelease
(
TargetPlatform
.
windows_
uwp_
x64
)),
];
];
}
}
...
@@ -367,7 +364,7 @@ class ProfileBundleWindowsAssetsUwp extends BundleWindowsAssetsUwp {
...
@@ -367,7 +364,7 @@ class ProfileBundleWindowsAssetsUwp extends BundleWindowsAssetsUwp {
@override
@override
List
<
Target
>
get
dependencies
=>
<
Target
>[
List
<
Target
>
get
dependencies
=>
<
Target
>[
...
super
.
dependencies
,
...
super
.
dependencies
,
const
WindowsAotBundle
(
AotElfProfile
(
TargetPlatform
.
windows_x64
)),
const
WindowsAotBundle
(
AotElfProfile
(
TargetPlatform
.
windows_
uwp_
x64
)),
];
];
}
}
...
...
packages/flutter_tools/lib/src/cache.dart
View file @
be2c68c8
...
@@ -69,6 +69,9 @@ class DevelopmentArtifact {
...
@@ -69,6 +69,9 @@ class DevelopmentArtifact {
/// Artifacts required for the Flutter Runner.
/// Artifacts required for the Flutter Runner.
static
const
DevelopmentArtifact
flutterRunner
=
DevelopmentArtifact
.
_
(
'flutter_runner'
,
feature:
flutterFuchsiaFeature
);
static
const
DevelopmentArtifact
flutterRunner
=
DevelopmentArtifact
.
_
(
'flutter_runner'
,
feature:
flutterFuchsiaFeature
);
/// Artifacts required for desktop Windows UWP.
static
const
DevelopmentArtifact
windowsUwp
=
DevelopmentArtifact
.
_
(
'winuwp'
,
feature:
windowsUwpEmbedding
);
/// Artifacts required for any development platform.
/// Artifacts required for any development platform.
///
///
/// This does not need to be explicitly returned from requiredArtifacts as
/// This does not need to be explicitly returned from requiredArtifacts as
...
@@ -88,6 +91,7 @@ class DevelopmentArtifact {
...
@@ -88,6 +91,7 @@ class DevelopmentArtifact {
fuchsia
,
fuchsia
,
universal
,
universal
,
flutterRunner
,
flutterRunner
,
windowsUwp
,
];
];
@override
@override
...
...
packages/flutter_tools/lib/src/commands/build_winuwp.dart
View file @
be2c68c8
...
@@ -31,8 +31,7 @@ class BuildWindowsUwpCommand extends BuildSubCommand {
...
@@ -31,8 +31,7 @@ class BuildWindowsUwpCommand extends BuildSubCommand {
@override
@override
Future
<
Set
<
DevelopmentArtifact
>>
get
requiredArtifacts
async
=>
<
DevelopmentArtifact
>{
Future
<
Set
<
DevelopmentArtifact
>>
get
requiredArtifacts
async
=>
<
DevelopmentArtifact
>{
// TODO(flutter): add a windows_uwp artifact here once that is updated.
DevelopmentArtifact
.
windowsUwp
,
// https://github.com/flutter/flutter/issues/78627
};
};
@override
@override
...
...
packages/flutter_tools/lib/src/commands/precache.dart
View file @
be2c68c8
...
@@ -50,6 +50,8 @@ class PrecacheCommand extends FlutterCommand {
...
@@ -50,6 +50,8 @@ class PrecacheCommand extends FlutterCommand {
help:
'Precache artifacts for Linux desktop development.'
);
help:
'Precache artifacts for Linux desktop development.'
);
argParser
.
addFlag
(
'windows'
,
negatable:
true
,
defaultsTo:
false
,
argParser
.
addFlag
(
'windows'
,
negatable:
true
,
defaultsTo:
false
,
help:
'Precache artifacts for Windows desktop development.'
);
help:
'Precache artifacts for Windows desktop development.'
);
argParser
.
addFlag
(
'winuwp'
,
negatable:
true
,
defaultsTo:
false
,
help:
'Precache artifacts for Windows UWP desktop development.'
);
argParser
.
addFlag
(
'macos'
,
negatable:
true
,
defaultsTo:
false
,
argParser
.
addFlag
(
'macos'
,
negatable:
true
,
defaultsTo:
false
,
help:
'Precache artifacts for macOS desktop development.'
);
help:
'Precache artifacts for macOS desktop development.'
);
argParser
.
addFlag
(
'fuchsia'
,
negatable:
true
,
defaultsTo:
false
,
argParser
.
addFlag
(
'fuchsia'
,
negatable:
true
,
defaultsTo:
false
,
...
...
packages/flutter_tools/lib/src/flutter_cache.dart
View file @
be2c68c8
...
@@ -41,6 +41,7 @@ class FlutterCache extends Cache {
...
@@ -41,6 +41,7 @@ class FlutterCache extends Cache {
registerArtifact
(
FlutterWebSdk
(
this
,
platform:
platform
));
registerArtifact
(
FlutterWebSdk
(
this
,
platform:
platform
));
registerArtifact
(
FlutterSdk
(
this
,
platform:
platform
));
registerArtifact
(
FlutterSdk
(
this
,
platform:
platform
));
registerArtifact
(
WindowsEngineArtifacts
(
this
,
platform:
platform
));
registerArtifact
(
WindowsEngineArtifacts
(
this
,
platform:
platform
));
registerArtifact
(
WindowsUwpEngineArtifacts
(
this
,
platform:
platform
));
registerArtifact
(
MacOSEngineArtifacts
(
this
,
platform:
platform
));
registerArtifact
(
MacOSEngineArtifacts
(
this
,
platform:
platform
));
registerArtifact
(
LinuxEngineArtifacts
(
this
,
platform:
platform
));
registerArtifact
(
LinuxEngineArtifacts
(
this
,
platform:
platform
));
registerArtifact
(
LinuxFuchsiaSDKArtifacts
(
this
,
platform:
platform
));
registerArtifact
(
LinuxFuchsiaSDKArtifacts
(
this
,
platform:
platform
));
...
@@ -300,6 +301,33 @@ class WindowsEngineArtifacts extends EngineCachedArtifact {
...
@@ -300,6 +301,33 @@ class WindowsEngineArtifacts extends EngineCachedArtifact {
List
<
String
>
getLicenseDirs
()
=>
const
<
String
>[];
List
<
String
>
getLicenseDirs
()
=>
const
<
String
>[];
}
}
class
WindowsUwpEngineArtifacts
extends
EngineCachedArtifact
{
WindowsUwpEngineArtifacts
(
Cache
cache
,
{
@required
Platform
platform
,
})
:
_platform
=
platform
,
super
(
'windows-uwp-sdk'
,
cache
,
DevelopmentArtifact
.
windowsUwp
,
);
final
Platform
_platform
;
@override
List
<
String
>
getPackageDirs
()
=>
const
<
String
>[];
@override
List
<
List
<
String
>>
getBinaryDirs
()
{
if
(
_platform
.
isWindows
||
ignorePlatformFiltering
)
{
return
_windowsUwpDesktopBinaryDirs
;
}
return
const
<
List
<
String
>>[];
}
@override
List
<
String
>
getLicenseDirs
()
=>
const
<
String
>[];
}
/// Artifacts required for desktop Linux builds.
/// Artifacts required for desktop Linux builds.
class
LinuxEngineArtifacts
extends
EngineCachedArtifact
{
class
LinuxEngineArtifacts
extends
EngineCachedArtifact
{
LinuxEngineArtifacts
(
Cache
cache
,
{
LinuxEngineArtifacts
(
Cache
cache
,
{
...
@@ -832,6 +860,13 @@ const List<List<String>> _windowsDesktopBinaryDirs = <List<String>>[
...
@@ -832,6 +860,13 @@ const List<List<String>> _windowsDesktopBinaryDirs = <List<String>>[
<
String
>[
'windows-x64-release'
,
'windows-x64-release/windows-x64-flutter.zip'
],
<
String
>[
'windows-x64-release'
,
'windows-x64-release/windows-x64-flutter.zip'
],
];
];
const
List
<
List
<
String
>>
_windowsUwpDesktopBinaryDirs
=
<
List
<
String
>>[
<
String
>[
'windows-uwp-x64-debug'
,
'windows-x64-debug/windows-uwp-x64-flutter.zip'
],
<
String
>[
'windows-uwp-x64-debug'
,
'windows-x64/flutter-cpp-client-wrapper.zip'
],
<
String
>[
'windows-uwp-x64-profile'
,
'windows-x64-profile/windows-uwp-x64-flutter.zip'
],
<
String
>[
'windows-uwp-x64-release'
,
'windows-x64-release/windows-uwp-x64-flutter.zip'
],
];
const
List
<
List
<
String
>>
_macOSDesktopBinaryDirs
=
<
List
<
String
>>[
const
List
<
List
<
String
>>
_macOSDesktopBinaryDirs
=
<
List
<
String
>>[
<
String
>[
'darwin-x64'
,
'darwin-x64/FlutterMacOS.framework.zip'
],
<
String
>[
'darwin-x64'
,
'darwin-x64/FlutterMacOS.framework.zip'
],
<
String
>[
'darwin-x64-profile'
,
'darwin-x64-profile/FlutterMacOS.framework.zip'
],
<
String
>[
'darwin-x64-profile'
,
'darwin-x64-profile/FlutterMacOS.framework.zip'
],
...
...
packages/flutter_tools/test/general.shard/artifacts_test.dart
View file @
be2c68c8
...
@@ -118,6 +118,18 @@ void main() {
...
@@ -118,6 +118,18 @@ void main() {
artifacts
.
getArtifactPath
(
Artifact
.
flutterTester
,
platform:
TargetPlatform
.
linux_arm64
),
artifacts
.
getArtifactPath
(
Artifact
.
flutterTester
,
platform:
TargetPlatform
.
linux_arm64
),
fileSystem
.
path
.
join
(
'root'
,
'bin'
,
'cache'
,
'artifacts'
,
'engine'
,
'linux-arm64'
,
'flutter_tester'
),
fileSystem
.
path
.
join
(
'root'
,
'bin'
,
'cache'
,
'artifacts'
,
'engine'
,
'linux-arm64'
,
'flutter_tester'
),
);
);
expect
(
artifacts
.
getArtifactPath
(
Artifact
.
windowsUwpDesktopPath
,
platform:
TargetPlatform
.
windows_uwp_x64
,
mode:
BuildMode
.
debug
),
fileSystem
.
path
.
join
(
'root'
,
'bin'
,
'cache'
,
'artifacts'
,
'engine'
,
'windows-uwp-x64-debug'
),
);
expect
(
artifacts
.
getArtifactPath
(
Artifact
.
windowsUwpDesktopPath
,
platform:
TargetPlatform
.
windows_uwp_x64
,
mode:
BuildMode
.
profile
),
fileSystem
.
path
.
join
(
'root'
,
'bin'
,
'cache'
,
'artifacts'
,
'engine'
,
'windows-uwp-x64-profile'
),
);
expect
(
artifacts
.
getArtifactPath
(
Artifact
.
windowsUwpDesktopPath
,
platform:
TargetPlatform
.
windows_uwp_x64
,
mode:
BuildMode
.
release
),
fileSystem
.
path
.
join
(
'root'
,
'bin'
,
'cache'
,
'artifacts'
,
'engine'
,
'windows-uwp-x64-release'
),
);
});
});
testWithoutContext
(
'precompiled web artifact paths are correct'
,
()
{
testWithoutContext
(
'precompiled web artifact paths are correct'
,
()
{
...
@@ -314,6 +326,20 @@ void main() {
...
@@ -314,6 +326,20 @@ void main() {
expect
(
artifacts
.
getArtifactPath
(
Artifact
.
engineDartBinary
),
contains
(
'.exe'
));
expect
(
artifacts
.
getArtifactPath
(
Artifact
.
engineDartBinary
),
contains
(
'.exe'
));
});
});
testWithoutContext
(
'Looks up windows UWP artifacts in host engine'
,
()
async
{
artifacts
=
LocalEngineArtifacts
(
fileSystem
.
path
.
join
(
fileSystem
.
currentDirectory
.
path
,
'out'
,
'winuwp_debug_unopt'
),
fileSystem
.
path
.
join
(
fileSystem
.
currentDirectory
.
path
,
'out'
,
'winuwp_debug_unopt'
),
cache:
cache
,
fileSystem:
fileSystem
,
platform:
FakePlatform
(
operatingSystem:
'windows'
),
processManager:
FakeProcessManager
.
any
(),
operatingSystemUtils:
FakeOperatingSystemUtils
(),
);
expect
(
artifacts
.
getArtifactPath
(
Artifact
.
windowsUwpDesktopPath
),
'/out/winuwp_debug_unopt'
);
});
testWithoutContext
(
'Looks up dart on linux platforms'
,
()
async
{
testWithoutContext
(
'Looks up dart on linux platforms'
,
()
async
{
expect
(
artifacts
.
getArtifactPath
(
Artifact
.
engineDartBinary
),
isNot
(
contains
(
'.exe'
)));
expect
(
artifacts
.
getArtifactPath
(
Artifact
.
engineDartBinary
),
isNot
(
contains
(
'.exe'
)));
});
});
...
...
packages/flutter_tools/test/general.shard/build_system/targets/windows_test.dart
View file @
be2c68c8
...
@@ -145,7 +145,7 @@ void main() {
...
@@ -145,7 +145,7 @@ void main() {
);
);
environment
.
buildDir
.
createSync
(
recursive:
true
);
environment
.
buildDir
.
createSync
(
recursive:
true
);
final
String
windowsDesktopPath
=
artifacts
.
getArtifactPath
(
Artifact
.
windowsDesktopPath
,
platform:
TargetPlatform
.
windows_x64
,
mode:
BuildMode
.
debug
);
final
String
windowsDesktopPath
=
artifacts
.
getArtifactPath
(
Artifact
.
windows
Uwp
DesktopPath
,
platform:
TargetPlatform
.
windows_x64
,
mode:
BuildMode
.
debug
);
final
String
windowsCppClientWrapper
=
artifacts
.
getArtifactPath
(
Artifact
.
windowsCppClientWrapper
,
platform:
TargetPlatform
.
windows_x64
,
mode:
BuildMode
.
debug
);
final
String
windowsCppClientWrapper
=
artifacts
.
getArtifactPath
(
Artifact
.
windowsCppClientWrapper
,
platform:
TargetPlatform
.
windows_x64
,
mode:
BuildMode
.
debug
);
final
String
icuData
=
artifacts
.
getArtifactPath
(
Artifact
.
icuData
,
platform:
TargetPlatform
.
windows_x64
);
final
String
icuData
=
artifacts
.
getArtifactPath
(
Artifact
.
icuData
,
platform:
TargetPlatform
.
windows_x64
);
final
List
<
String
>
requiredFiles
=
<
String
>[
final
List
<
String
>
requiredFiles
=
<
String
>[
...
...
packages/flutter_tools/test/general.shard/cache_test.dart
View file @
be2c68c8
...
@@ -589,6 +589,20 @@ void main() {
...
@@ -589,6 +589,20 @@ void main() {
]));
]));
});
});
testWithoutContext
(
'Windows UWP desktop artifacts include profile, debug, and release artifacts'
,
()
{
final
Cache
cache
=
Cache
.
test
(
processManager:
FakeProcessManager
.
any
());
final
WindowsUwpEngineArtifacts
artifacts
=
WindowsUwpEngineArtifacts
(
cache
,
platform:
FakePlatform
(
operatingSystem:
'windows'
),
);
expect
(
artifacts
.
getBinaryDirs
(),
containsAll
(<
Matcher
>[
contains
(
contains
(
'profile'
)),
contains
(
contains
(
'release'
)),
contains
(
contains
(
'debug'
)),
]));
});
testWithoutContext
(
'Linux desktop artifacts ignore filtering when requested'
,
()
{
testWithoutContext
(
'Linux desktop artifacts ignore filtering when requested'
,
()
{
fakeProcessManager
.
addCommand
(
unameCommandForX64
);
fakeProcessManager
.
addCommand
(
unameCommandForX64
);
...
...
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