Skip to content

Commit 2b8f510

Browse files
Fatme Havaluovateobugslayer
Fatme Havaluova
authored andcommitted
Process correctly androidManifest.xml from App_Resources
1 parent 64f4cd2 commit 2b8f510

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

lib/definitions/project.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ interface IPlatformProjectService {
5757
afterPrepareAllPlugins(): IFuture<void>;
5858
getAppResourcesDestinationDirectoryPath(): IFuture<string>;
5959
deploy(deviceIdentifier: string): IFuture<void>;
60+
processConfigurationFilesFromAppResources(): IFuture<void>;
6061
}
6162

6263
interface IAndroidProjectPropertiesManager {

lib/services/android-project-service.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,16 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
276276
public preparePluginNativeCode(pluginData: IPluginData): IFuture<void> {
277277
return (() => {
278278
let pluginPlatformsFolderPath = this.getPluginPlatformsFolderPath(pluginData, AndroidProjectService.ANDROID_PLATFORM_NAME);
279-
280279
this.processResourcesFromPlugin(pluginData.name, pluginPlatformsFolderPath).wait();
280+
}).future<void>()();
281+
}
281282

283+
public processConfigurationFilesFromAppResources(): IFuture<void> {
284+
return (() => {
282285
// Process androidManifest.xml from App_Resources
283-
let manifestFilePath = path.join(this.$projectData.appResourcesDirectoryPath, this.platformData.configurationFileName);
286+
let manifestFilePath = path.join(this.$projectData.appResourcesDirectoryPath, this.platformData.normalizedPlatformName, this.platformData.configurationFileName);
284287
if (this.$fs.exists(manifestFilePath).wait()) {
285-
this.processResourcesFromPlugin("NativescriptAppResources", this.$projectData.appResourcesDirectoryPath).wait();
288+
this.processResourcesFromPlugin("NativescriptAppResources", path.dirname(manifestFilePath)).wait();
286289
}
287290
}).future<void>()();
288291
}

lib/services/ios-project-service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,10 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
354354
}).future<void>()();
355355
}
356356

357+
public processConfigurationFilesFromAppResources(): IFuture<void> {
358+
return Future.fromResult();
359+
}
360+
357361
private get projectPodFilePath(): string {
358362
return path.join(this.platformData.projectRoot, "Podfile");
359363
}

lib/services/platform-service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ export class PlatformService implements IPlatformService {
217217
let excludedDirs = [constants.APP_RESOURCES_FOLDER_NAME];
218218
this.$projectFilesManager.processPlatformSpecificFiles(directoryPath, platform, excludedDirs).wait();
219219

220+
// Process configurations files from App_Resources
221+
platformData.platformProjectService.processConfigurationFilesFromAppResources().wait();
222+
220223
this.$logger.out("Project successfully prepared");
221224
}).future<void>()();
222225
}

0 commit comments

Comments
 (0)