Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the build directory as a condition for determining if it's the first build or not #16558

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scripts/native-pack-tool/source/platforms/android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@ export class AndroidPackTool extends NativePackTool {
if (!fs.existsSync(this.paths.nativePrjDir)) {
// 拷贝 lite 仓库的 templates/android/build 文件到构建输出目录
await fs.copy(ps.join(this.paths.nativeTemplateDirInCocos, this.params.platform, 'build'), this.paths.nativePrjDir, { overwrite: false });
this.firstTimeBuild = true;
} else {
this.firstTimeBuild = false;
}
// 原生工程不重复拷贝 TODO 复用前需要做版本检测
if (!fs.existsSync(this.paths.platformTemplateDirInPrj)) {
// 拷贝 lite 仓库的 templates/android/template 文件到构建输出目录
await fs.copy(ps.join(this.paths.nativeTemplateDirInCocos, this.params.platform, 'template'), this.paths.platformTemplateDirInPrj, { overwrite: false });
this.writeEngineVersion();
this.firstTimeBuild = true;
} else {
this.validateNativeDir();
this.firstTimeBuild = false;
}
}

Expand Down
Loading