Unverified Commit 7472fad1 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Remove most of the target logic for build web, cleanup rules (#34589)

parent 1d0aa02a
This diff is collapsed.
...@@ -131,8 +131,7 @@ class ResidentWebRunner extends ResidentRunner { ...@@ -131,8 +131,7 @@ class ResidentWebRunner extends ResidentRunner {
} }
// Start the web compiler and build the assets. // Start the web compiler and build the assets.
await webCompilationProxy.initialize( await webCompilationProxy.initialize(
projectDirectory: FlutterProject.current().directory, projectDirectory: flutterProject.directory,
targets: <String>[target],
); );
_lastCompiled = DateTime.now(); _lastCompiled = DateTime.now();
final AssetBundle assetBundle = AssetBundleFactory.instance.createBundle(); final AssetBundle assetBundle = AssetBundleFactory.instance.createBundle();
......
...@@ -76,9 +76,6 @@ Future<int> runTests( ...@@ -76,9 +76,6 @@ Future<int> runTests(
final bool result = await webCompilationProxy.initialize( final bool result = await webCompilationProxy.initialize(
projectDirectory: flutterProject.directory, projectDirectory: flutterProject.directory,
testOutputDir: tempBuildDir, testOutputDir: tempBuildDir,
targets: testFiles.map((String testFile) {
return fs.path.relative(testFile, from: flutterProject.directory.path);
}).toList(),
); );
if (!result) { if (!result) {
throwToolExit('Failed to compile tests'); throwToolExit('Failed to compile tests');
......
...@@ -30,7 +30,6 @@ Future<void> buildWeb(FlutterProject flutterProject, String target, BuildInfo bu ...@@ -30,7 +30,6 @@ Future<void> buildWeb(FlutterProject flutterProject, String target, BuildInfo bu
try { try {
result = await webCompilationProxy.initialize( result = await webCompilationProxy.initialize(
projectDirectory: FlutterProject.current().directory, projectDirectory: FlutterProject.current().directory,
targets: <String>[target],
release: buildInfo.isRelease, release: buildInfo.isRelease,
); );
if (result) { if (result) {
...@@ -79,11 +78,8 @@ class WebCompilationProxy { ...@@ -79,11 +78,8 @@ class WebCompilationProxy {
/// ///
/// `release` controls whether we build the bundle for dartdevc or only /// `release` controls whether we build the bundle for dartdevc or only
/// the entrypoints for dart2js to later take over. /// the entrypoints for dart2js to later take over.
///
/// `targets` controls the specific compiler targets.
Future<bool> initialize({ Future<bool> initialize({
@required Directory projectDirectory, @required Directory projectDirectory,
@required List<String> targets,
String testOutputDir, String testOutputDir,
bool release, bool release,
}) async { }) async {
......
...@@ -38,7 +38,6 @@ void main() { ...@@ -38,7 +38,6 @@ void main() {
fs.file(fs.path.join('lib', 'main.dart')).createSync(recursive: true); fs.file(fs.path.join('lib', 'main.dart')).createSync(recursive: true);
when(mockWebCompilationProxy.initialize( when(mockWebCompilationProxy.initialize(
projectDirectory: anyNamed('projectDirectory'), projectDirectory: anyNamed('projectDirectory'),
targets: anyNamed('targets'),
release: anyNamed('release') release: anyNamed('release')
)).thenAnswer((Invocation invocation) { )).thenAnswer((Invocation invocation) {
final String path = fs.path.join('.dart_tool', 'build', 'flutter_web', 'foo', 'lib', 'main_web_entrypoint.dart.js'); final String path = fs.path.join('.dart_tool', 'build', 'flutter_web', 'foo', 'lib', 'main_web_entrypoint.dart.js');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment