Skip to content

Commit 51a1dae

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Process correctly androidManifest.xml from App_Resources
1 parent 825bdf4 commit 51a1dae

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

lib/definitions/project.d.ts

+1
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

+8-2
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,16 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
270270

271271
this.processResourcesFromPlugin(pluginData.name, pluginPlatformsFolderPath).wait();
272272

273+
274+
}).future<void>()();
275+
}
276+
277+
public processConfigurationFilesFromAppResources(): IFuture<void> {
278+
return (() => {
273279
// Process androidManifest.xml from App_Resources
274-
let manifestFilePath = path.join(this.$projectData.appResourcesDirectoryPath, this.platformData.configurationFileName);
280+
let manifestFilePath = path.join(this.$projectData.appResourcesDirectoryPath, this.platformData.normalizedPlatformName, this.platformData.configurationFileName);
275281
if (this.$fs.exists(manifestFilePath).wait()) {
276-
this.processResourcesFromPlugin("NativescriptAppResources", this.$projectData.appResourcesDirectoryPath).wait();
282+
this.processResourcesFromPlugin("NativescriptAppResources", path.dirname(manifestFilePath)).wait();
277283
}
278284
}).future<void>()();
279285
}

lib/services/ios-project-service.ts

+4
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

+3
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)