Skip to content

feat: 对齐 Android 模板目录结构 - #181

Open
dream93 wants to merge 1 commit into
cocos:v4.0.0from
dream93:feat/align-android-template
Open

feat: 对齐 Android 模板目录结构#181
dream93 wants to merge 1 commit into
cocos:v4.0.0from
dream93:feat/align-android-template

Conversation

@dream93

@dream93 dream93 commented Jul 6, 2026

Copy link
Copy Markdown

将 Android 模板工程结构对齐 Cocos 官方默认模板:

  • app / instantapp 的 AndroidManifest.xml 移动到 src/main/ 下
  • AppActivity.java / InstantActivity.java 移动到 src/main/java/ 下
  • build.gradle 的 sourceSets 相应调整,新增 src/main/res、src/main/assets 目录

好处:

  • 多渠道打包可在 src 下建立对应目录进行配置,无需手动设置 sourceSets
  • 对齐 SDK 往 assets 目录添加文件的标准路径,降低接入复杂度,同时保持向后兼容

Re: #

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

将 Android 模板工程结构对齐 Cocos 官方默认模板:
- app / instantapp 的 AndroidManifest.xml 移动到 src/main/ 下
- AppActivity.java / InstantActivity.java 移动到 src/main/java/ 下
- build.gradle 的 sourceSets 相应调整,新增 src/main/res、src/main/assets 目录

好处:
- 多渠道打包可在 src 下建立对应目录进行配置,无需手动设置 sourceSets
- 对齐 SDK 往 assets 目录添加文件的标准路径,降低接入复杂度,同时保持向后兼容
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