Skip to content

Commit 5560853

Browse files
committed
fix(android): copy all other directories from App_Resources/Android to platforms/android. Those must be modules like AndroidTest or benchmark
1 parent 54ed89d commit 5560853

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

lib/services/android-project-service.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,15 +677,31 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
677677
projectAppResourcesPath
678678
);
679679
if (appResourcesDirStructureHasMigrated) {
680+
681+
const resourcesPath =path.join(
682+
projectAppResourcesPath,
683+
platformData.normalizedPlatformName);
680684
this.$fs.copyFile(
681685
path.join(
682-
projectAppResourcesPath,
683-
platformData.normalizedPlatformName,
686+
resourcesPath,
684687
constants.SRC_DIR,
685688
"*"
686689
),
687690
platformsAppResourcesPath
688691
);
692+
693+
const destinationFolder = this.getPlatformData(projectData).projectRoot;
694+
const contents = this.$fs.readDirectory(resourcesPath);
695+
_.each(contents, (fileName) => {
696+
const filePath = path.join(resourcesPath, fileName);
697+
const fsStat = this.$fs.getFsStats(filePath);
698+
if (fsStat.isDirectory() && fileName !== constants.SRC_DIR){
699+
console.log('copying folder', filePath)
700+
this.$fs.copyFile(filePath,
701+
destinationFolder
702+
);
703+
}
704+
});
689705
} else {
690706
this.$fs.copyFile(
691707
path.join(

0 commit comments

Comments
 (0)