@@ -296,18 +296,20 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
296296 this . $fs . ensureDirectoryExists ( configurationsDirectoryPath ) . wait ( ) ;
297297
298298 let pluginConfigurationDirectoryPath = path . join ( configurationsDirectoryPath , pluginName ) ;
299- this . $fs . ensureDirectoryExists ( pluginConfigurationDirectoryPath ) . wait ( ) ;
299+ if ( this . $fs . exists ( pluginPlatformsFolderPath ) . wait ( ) ) {
300+ this . $fs . ensureDirectoryExists ( pluginConfigurationDirectoryPath ) . wait ( ) ;
301+
302+ // Copy all resources from plugin
303+ let resourcesDestinationDirectoryPath = path . join ( this . platformData . projectRoot , "src" , pluginName ) ;
304+ this . $fs . ensureDirectoryExists ( resourcesDestinationDirectoryPath ) . wait ( ) ;
305+ shell . cp ( "-Rf" , path . join ( pluginPlatformsFolderPath , "*" ) , resourcesDestinationDirectoryPath ) ;
306+ }
300307
301308 // Copy include.gradle file
302309 let includeGradleFilePath = path . join ( pluginPlatformsFolderPath , "include.gradle" ) ;
303310 if ( this . $fs . exists ( includeGradleFilePath ) . wait ( ) ) {
304311 shell . cp ( "-f" , includeGradleFilePath , pluginConfigurationDirectoryPath ) ;
305312 }
306-
307- // Copy all resources from plugin
308- let resourcesDestinationDirectoryPath = path . join ( this . platformData . projectRoot , "src" , pluginName ) ;
309- this . $fs . ensureDirectoryExists ( resourcesDestinationDirectoryPath ) . wait ( ) ;
310- shell . cp ( "-Rf" , path . join ( pluginPlatformsFolderPath , "*" ) , resourcesDestinationDirectoryPath ) ;
311313 } ) . future < void > ( ) ( ) ;
312314 }
313315
0 commit comments