Keep generated Linux plugin registries out of build identity

This commit is contained in:
2026-11-08 16:50:15 +00:00
parent 28b7eaeee4
commit 761ff021fe
4 changed files with 22 additions and 1 deletions
+10
View File
@@ -110,6 +110,16 @@ class DesktopBuildTests(unittest.TestCase):
(generated / "local-path").write_text("machine-specific generated value")
self.assertEqual(macos, core.digest("macos", self.app))
def test_pub_get_generated_linux_registries_do_not_change_source_key(self):
before = core.digest("linux", self.app)
directory = self.app / "linux/flutter"
directory.mkdir()
for name in ("generated_plugin_registrant.cc", "generated_plugin_registrant.h", "generated_plugins.cmake"):
(directory / name).write_text("generated from locked dependencies")
self.assertEqual(before, core.digest("linux", self.app))
(self.app / "pubspec.lock").write_text("changed dependency lock")
self.assertNotEqual(before, core.digest("linux", self.app))
@patch.object(desktop.platform, "system", return_value="Darwin")
def test_native_macos_preserves_framework_symlinks_and_reuses_build(self, _):
bundle, archive = self.build("macos", flutter="/fixture/flutter")