Unverified Commit 517c08e8 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Make output directory a build input (#41862)

parent 439dc5cf
......@@ -292,8 +292,7 @@ class Environment {
buffer.write(key);
buffer.write(defines[key]);
}
// in case there was no configuration, provide some value.
buffer.write('Flutter is awesome');
buffer.write(outputDir.path);
final String output = buffer.toString();
final Digest digest = md5.convert(utf8.encode(output));
buildPrefix = hex.encode(digest.bytes);
......
......@@ -334,6 +334,13 @@ void main() {
await buildSystem.build(target, environment);
expect(called, 1);
}));
test('output directory is an input to the build', () => testbed.run(() async {
final Environment environmentA = Environment(projectDir: fs.currentDirectory, outputDir: fs.directory('a'));
final Environment environmentB = Environment(projectDir: fs.currentDirectory, outputDir: fs.directory('b'));
expect(environmentA.buildDir.path, isNot(environmentB.buildDir.path));
}));
}
class MockPlatform extends Mock implements Platform {}
......
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