From a8caa2813548f0953106e71039d0132a1d7ae837 Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Thu, 19 Nov 2015 11:09:17 +0200 Subject: [PATCH] Create configurations and src folders only for plugins that have native files --- lib/services/android-project-service.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/services/android-project-service.ts b/lib/services/android-project-service.ts index 8868de0dc4..6a66beccc3 100644 --- a/lib/services/android-project-service.ts +++ b/lib/services/android-project-service.ts @@ -296,18 +296,20 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject this.$fs.ensureDirectoryExists(configurationsDirectoryPath).wait(); let pluginConfigurationDirectoryPath = path.join(configurationsDirectoryPath, pluginName); - this.$fs.ensureDirectoryExists(pluginConfigurationDirectoryPath).wait(); + if (this.$fs.exists(pluginPlatformsFolderPath).wait()) { + this.$fs.ensureDirectoryExists(pluginConfigurationDirectoryPath).wait(); + + // Copy all resources from plugin + let resourcesDestinationDirectoryPath = path.join(this.platformData.projectRoot, "src", pluginName); + this.$fs.ensureDirectoryExists(resourcesDestinationDirectoryPath).wait(); + shell.cp("-Rf", path.join(pluginPlatformsFolderPath, "*"), resourcesDestinationDirectoryPath); + } // Copy include.gradle file let includeGradleFilePath = path.join(pluginPlatformsFolderPath, "include.gradle"); if(this.$fs.exists(includeGradleFilePath).wait()) { shell.cp("-f", includeGradleFilePath, pluginConfigurationDirectoryPath); } - - // Copy all resources from plugin - let resourcesDestinationDirectoryPath = path.join(this.platformData.projectRoot, "src", pluginName); - this.$fs.ensureDirectoryExists(resourcesDestinationDirectoryPath).wait(); - shell.cp("-Rf", path.join(pluginPlatformsFolderPath, "*"), resourcesDestinationDirectoryPath); }).future()(); }