refactor(build): unify SDK configuration and release tooling
Pin Flutter with FVM and share local environment loading across IDE, Python, and Dart entrypoints. Keep CI on the verified preinstalled SDK and skip local overrides. Extract common build presets, process execution, and file hashing. Propagate project roots through SDK selection and release commands, and migrate macOS release, signing, and DMG orchestration to Python. Reuse local check suites in CI, support Android source overrides, and update documentation and regression tests.
This commit is contained in:
1 parent
a13a54d5ec
commit
0343e2f723
57 files changed
+1858
-375
No files matched your search
@@ -3,10 +3,14 @@
|
||||
Requires pefile on the build host. Models remain separate from the application.
|
||||
"""
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
||||
from common.files import file_sha256
|
||||
from common.process import cli
|
||||
|
||||
from check_windows_release import audit
|
||||
|
||||
@@ -27,8 +31,7 @@ def main():
|
||||
path = (runtime / name).resolve()
|
||||
if not path.is_relative_to(runtime):
|
||||
raise ValueError(f'Invalid processing manifest path: {name}')
|
||||
with path.open('rb') as stream:
|
||||
actual = hashlib.file_digest(stream, 'sha256').hexdigest()
|
||||
actual = file_sha256(path)
|
||||
if actual.lower() != expected.lower():
|
||||
raise ValueError(f'Processing checksum mismatch: {name}')
|
||||
# Older Flutter builds can retain the unused JNI plugin from Android's
|
||||
@@ -40,11 +43,10 @@ def main():
|
||||
manifest = {}
|
||||
for path in sorted(output.rglob('*')):
|
||||
if path.is_file():
|
||||
with path.open('rb') as stream:
|
||||
manifest[path.relative_to(output).as_posix()] = hashlib.file_digest(stream, 'sha256').hexdigest()
|
||||
manifest[path.relative_to(output).as_posix()] = file_sha256(path)
|
||||
(output / 'checksums.json').write_text(json.dumps(manifest, indent=2) + '\n', encoding='utf-8')
|
||||
print(f'Portable package staged: {output} ({len(manifest)} files)')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
sys.exit(cli(main))
|
||||
Reference in new issue
Block a user