@@ -236,29 +236,11 @@ class PlatformProjectService implements IPlatformProjectService {
236236
237237 public buildProject ( platform : string ) : IFuture < void > {
238238 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" ) ;
249242 } ) . future < void > ( ) ( ) ;
250243 }
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- }
262244}
263245$injector . register ( "platformProjectService" , PlatformProjectService ) ;
264246
@@ -323,9 +305,8 @@ class AndroidProjectService implements IPlatformSpecificProjectService {
323305 this . runAndroidUpdate ( projectRoot , targetApi ) . wait ( ) ;
324306 }
325307
326- public buildProject ( ) : IFuture < void > {
308+ public buildProject ( projectRoot : string ) : IFuture < void > {
327309 return ( ( ) => {
328- var projectRoot = path . join ( this . $projectData . platformsDir , "android" ) ;
329310 var buildConfiguration = options . release || "--debug" ;
330311 var args = this . getAntArgs ( buildConfiguration , projectRoot ) ;
331312
@@ -440,7 +421,7 @@ $injector.register("androidProjectService", AndroidProjectService);
440421
441422class IOSProjectService implements IPlatformSpecificProjectService {
442423 public validate ( ) : void {
443-
424+
444425 }
445426
446427 public checkRequirements ( ) : IFuture < void > {
0 commit comments