Skip to content

Commit dfd687b

Browse files
author
Fatme
authored
Merge pull request #3619 from NativeScript/fatme/fix-app-resources-changed
Make appResourcesChanged check to be executed per platform
2 parents 3b63e89 + d04fe89 commit dfd687b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/services/project-changes-service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ export class ProjectChangesService implements IProjectChangesService {
6666
this._changesInfo.appFilesChanged = await this.hasChangedAppFiles(projectData);
6767

6868
this._changesInfo.packageChanged = this.isProjectFileChanged(projectData, platform);
69-
this._changesInfo.appResourcesChanged = this.containsNewerFiles(projectData.appResourcesDirectoryPath, null, projectData);
69+
70+
const platformResourcesDir = path.join(projectData.appResourcesDirectoryPath, platformData.normalizedPlatformName);
71+
this._changesInfo.appResourcesChanged = this.containsNewerFiles(platformResourcesDir, null, projectData);
7072
/*done because currently all node_modules are traversed, a possible improvement could be traversing only the production dependencies*/
7173
this._changesInfo.nativeChanged = this.containsNewerFiles(
7274
path.join(projectData.projectDir, NODE_MODULES_FOLDER_NAME),
@@ -77,7 +79,6 @@ export class ProjectChangesService implements IProjectChangesService {
7779
if (this._newFiles > 0 || this._changesInfo.nativeChanged) {
7880
this._changesInfo.modulesChanged = true;
7981
}
80-
const platformResourcesDir = path.join(projectData.appResourcesDirectoryPath, platformData.normalizedPlatformName);
8182
if (platform === this.$devicePlatformsConstants.iOS.toLowerCase()) {
8283
this._changesInfo.configChanged = this.filesChanged([path.join(platformResourcesDir, platformData.configurationFileName),
8384
path.join(platformResourcesDir, "LaunchScreen.storyboard"),

0 commit comments

Comments
 (0)