@@ -296,18 +296,20 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
296
296
this . $fs . ensureDirectoryExists ( configurationsDirectoryPath ) . wait ( ) ;
297
297
298
298
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
+ }
300
307
301
308
// Copy include.gradle file
302
309
let includeGradleFilePath = path . join ( pluginPlatformsFolderPath , "include.gradle" ) ;
303
310
if ( this . $fs . exists ( includeGradleFilePath ) . wait ( ) ) {
304
311
shell . cp ( "-f" , includeGradleFilePath , pluginConfigurationDirectoryPath ) ;
305
312
}
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 ) ;
311
313
} ) . future < void > ( ) ( ) ;
312
314
}
313
315
0 commit comments