Skip to content

feat: allow narrowing release ABIs - #7

Open
Windsland52 wants to merge 1 commit into
Aliothmoon:mainfrom
Windsland52:feat/configurable-release-abi
Open

feat: allow narrowing release ABIs#7
Windsland52 wants to merge 1 commit into
Aliothmoon:mainfrom
Windsland52:feat/configurable-release-abi

Conversation

@Windsland52

Copy link
Copy Markdown

变更

  • 新增 build.releaseAbi,可在 local.properties 中按逗号配置 arm64-v8a / x86_64
  • 未配置时继续默认双 ABI,保持现有行为
  • 配置不支持的 ABI 时在 Gradle 配置阶段直接失败
  • 更新集成文档,明确 release 外壳、MaaFramework 与 agent runtime 的 ABI 必须一致

build.releaseAbi 也会被 release 派生的 baseline profile / benchmark 变体继承,使性能测量保持与实际发布形态一致。

背景

PI 项目可能只提供单 ABI 的 MaaFramework 和 agent runtime。此前 release 外壳固定包含双 ABI,会让 APK 在另一架构设备上可安装,但运行时因缺少对应 framework/agent 而失败。这个开关允许项目生成真正的单 ABI release。

验证

  • .\gradlew.bat :app:testDebugUnitTest :app:assembleRelease
  • build.releaseAbi=arm64-v8a:release APK 仅包含 lib/arm64-v8a
  • 未配置:release APK 同时包含 lib/arm64-v8alib/x86_64
  • build.releaseAbi=armeabi-v7a:配置阶段按预期失败并报告支持列表
  • consumer M9A:pnpm check

完整 .\gradlew.bat build 仍会在既有的 :semi-icons:verifyReleaseResources 失败(drawable 引用的 attr/colorControlNormal 在 library resource verification 中不可解析);本次涉及的 app 单测、release 构建和 R8 keep 校验均通过。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant