Skip to content

Commit 2f214b6

Browse files
fix: copy Android App_Resources only once
Currently, in case the Android's App_Resources structure is migrated, we copy the files twice. Fix this by setting correct folders to copy the files.
1 parent 9075b88 commit 2f214b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/services/android-project-service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,11 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
289289

290290
this.$fs.ensureDirectoryExists(platformsAppResourcesPath);
291291

292-
this.$fs.copyFile(path.join(projectAppResourcesPath, platformData.normalizedPlatformName, "*"), path.dirname(platformsAppResourcesPath));
293292
const appResourcesDirStructureHasMigrated = this.$androidResourcesMigrationService.hasMigrated(projectAppResourcesPath);
294293
if (appResourcesDirStructureHasMigrated) {
295-
this.$fs.copyFile(path.join(projectAppResourcesPath, platformData.normalizedPlatformName, "src", "*"), platformsAppResourcesPath);
294+
this.$fs.copyFile(path.join(projectAppResourcesPath, platformData.normalizedPlatformName, constants.SRC_DIR, "*"), platformsAppResourcesPath);
296295
} else {
296+
this.$fs.copyFile(path.join(projectAppResourcesPath, platformData.normalizedPlatformName, "*"), platformsAppResourcesPath);
297297
// https://github.com/NativeScript/android-runtime/issues/899
298298
// App_Resources/Android/libs is reserved to user's aars and jars, but they should not be copied as resources
299299
this.$fs.deleteDirectory(path.join(platformsAppResourcesPath, "libs"));

0 commit comments

Comments
 (0)