diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..cdef0c6d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# CMake embeds a digest of these exact source bytes into the prebuilt reader. +# Keep checkouts identical on Windows and Linux so the artifact check is stable. +ohos/entry/src/main/cpp/** text eol=lf diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 0fe63891..c11c35b2 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -267,6 +267,116 @@ jobs: exit 1 fi + # Prebuilt plugin JNI can remain 4 KB aligned even with a new NDK. + python3 - "$apk" --zipalign "$(dirname "$aapt")/zipalign" <<'PY_16KB' + #!/usr/bin/env python3 + """Check 64-bit ELF LOAD alignment and uncompressed APK library offsets. + + Read-only; uses Python's standard library. Optionally also run SDK zipalign. + This verifies packaging/linker alignment, not runtime page-size assumptions. + """ + + import argparse + import struct + import subprocess + import sys + import zipfile + from pathlib import Path + + PAGE_SIZE = 16384 + MACHINES = {"arm64-v8a": 183, "x86_64": 62} + + + def check_elf(stream, abi): + header = stream.read(64) + if (len(header) < 64 or header[:4] != b"\x7fELF" or + header[4:6] != b"\x02\x01"): + raise ValueError("expected little-endian ELF64") + if struct.unpack_from(" !file.path.endsWith('data/api/decrypted_http_trace.dart'), + (file) => !file.path + .replaceAll('\\', '/') + .endsWith('data/api/decrypted_http_trace.dart'), )) { expect( file.readAsStringSync(), diff --git a/test/campus_card/architecture/platform_contract_test.dart b/test/campus_card/architecture/platform_contract_test.dart index fe6afee2..cd78ab32 100644 --- a/test/campus_card/architecture/platform_contract_test.dart +++ b/test/campus_card/architecture/platform_contract_test.dart @@ -91,7 +91,11 @@ void main() { ); for (final entity in presentation.listSync(recursive: true)) { if (entity is! File || !entity.path.endsWith('.dart')) continue; - if (entity.path.endsWith('/icons/platform_icons.dart')) continue; + if (entity.path + .replaceAll('\\', '/') + .endsWith('/icons/platform_icons.dart')) { + continue; + } expect( entity.readAsStringSync(), isNot(contains('CupertinoIcons.')),