@@ -236,29 +236,11 @@ class PlatformProjectService implements IPlatformProjectService {
236
236
237
237
public buildProject ( platform : string ) : IFuture < void > {
238
238
return ( ( ) => {
239
- this . executePlatformSpecificAction ( platform , "buildProject" ) . wait ( ) ;
240
- } ) . future < void > ( ) ( ) ;
241
- }
242
-
243
- private executePlatformSpecificAction ( platform , functionName : string ) : IFuture < void > {
244
- return ( ( ) => {
245
- var platformProjectService = null ;
246
-
247
-
248
- this . executeFunctionByName ( functionName , platformProjectService ) . wait ( ) ;
239
+ var platformData = this . $platformsData . getPlatformData ( platform ) ;
240
+ platformData . platformProjectService . buildProject ( platformData . projectRoot ) . wait ( ) ;
241
+ this . $logger . out ( "Project successfully built" ) ;
249
242
} ) . future < void > ( ) ( ) ;
250
243
}
251
-
252
- private executeFunctionByName ( functionName , context ) : IFuture < any > {
253
- return ( ( ) => {
254
- var namespaces = functionName . split ( "." ) ;
255
- var func = namespaces . pop ( ) ;
256
- for ( var i = 0 ; i < namespaces . length ; i ++ ) {
257
- context = context [ namespaces [ i ] ] ;
258
- }
259
- return context [ func ] . apply ( context ) . wait ( ) ;
260
- } ) . future < any > ( ) ( ) ;
261
- }
262
244
}
263
245
$injector . register ( "platformProjectService" , PlatformProjectService ) ;
264
246
@@ -323,9 +305,8 @@ class AndroidProjectService implements IPlatformSpecificProjectService {
323
305
this . runAndroidUpdate ( projectRoot , targetApi ) . wait ( ) ;
324
306
}
325
307
326
- public buildProject ( ) : IFuture < void > {
308
+ public buildProject ( projectRoot : string ) : IFuture < void > {
327
309
return ( ( ) => {
328
- var projectRoot = path . join ( this . $projectData . platformsDir , "android" ) ;
329
310
var buildConfiguration = options . release || "--debug" ;
330
311
var args = this . getAntArgs ( buildConfiguration , projectRoot ) ;
331
312
@@ -440,7 +421,7 @@ $injector.register("androidProjectService", AndroidProjectService);
440
421
441
422
class IOSProjectService implements IPlatformSpecificProjectService {
442
423
public validate ( ) : void {
443
-
424
+
444
425
}
445
426
446
427
public checkRequirements ( ) : IFuture < void > {
0 commit comments