@@ -2,9 +2,9 @@ import * as path from "path";
2
2
import * as choki from "chokidar" ;
3
3
import { EOL } from "os" ;
4
4
import { EventEmitter } from "events" ;
5
- import { hook , executeActionByChunks , isBuildFromCLI } from "../../common/helpers" ;
5
+ import { hook , isBuildFromCLI } from "../../common/helpers" ;
6
6
import { PACKAGE_JSON_FILE_NAME , LiveSyncTrackActionNames , USER_INTERACTION_NEEDED_EVENT_NAME , DEBUGGER_ATTACHED_EVENT_NAME , DEBUGGER_DETACHED_EVENT_NAME , TrackActionNames } from "../../constants" ;
7
- import { DEFAULT_CHUNK_SIZE , DeviceTypes , DeviceDiscoveryEventNames } from "../../common/constants" ;
7
+ import { DeviceTypes , DeviceDiscoveryEventNames } from "../../common/constants" ;
8
8
import { cache } from "../../common/decorators" ;
9
9
10
10
const deviceDescriptorPrimaryKey = "identifier" ;
@@ -37,8 +37,7 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
37
37
private $debugDataService : IDebugDataService ,
38
38
private $analyticsService : IAnalyticsService ,
39
39
private $usbLiveSyncService : DeprecatedUsbLiveSyncService ,
40
- private $injector : IInjector ,
41
- private $platformsData : IPlatformsData ) {
40
+ private $injector : IInjector ) {
42
41
super ( ) ;
43
42
}
44
43
@@ -463,26 +462,6 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
463
462
const platform = device . deviceInfo . platform ;
464
463
const deviceBuildInfoDescriptor = _ . find ( deviceDescriptors , dd => dd . identifier === device . deviceInfo . identifier ) ;
465
464
466
- if ( liveSyncData . watchAllFiles ) {
467
- const platformData : IPlatformData = this . $platformsData . getPlatformData ( "android" , projectData ) ;
468
- const pluginsNeedingRebuild : Array < any > = await platformData . platformProjectService . checkIfPluginsNeedBuild ( projectData ) ;
469
- const action = async ( buildAarOptions : IBuildOptions ) => {
470
- this . $logger . warn ( `Building ${ buildAarOptions . pluginName } ...` ) ;
471
- await platformData . platformProjectService . prebuildNativePlugin ( buildAarOptions ) ;
472
- } ;
473
- const pluginInfo : any = [ ] ;
474
- pluginsNeedingRebuild . forEach ( ( item ) => {
475
- const options : IBuildOptions = {
476
- pluginName : item . pluginName ,
477
- platformsAndroidDirPath : item . platformsAndroidDirPath ,
478
- aarOutputDir : item . platformsAndroidDirPath ,
479
- tempPluginDirPath : path . join ( projectData . platformsDir , 'tempPlugin' )
480
- } ;
481
- pluginInfo . push ( options ) ;
482
- } ) ;
483
- await executeActionByChunks < IBuildOptions > ( pluginInfo , DEFAULT_CHUNK_SIZE , action ) ;
484
- }
485
-
486
465
await this . ensureLatestAppPackageIsInstalledOnDevice ( {
487
466
device,
488
467
preparedPlatforms,
@@ -582,37 +561,7 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
582
561
filesToRemove = [ ] ;
583
562
584
563
const allModifiedFiles = [ ] . concat ( currentFilesToSync ) . concat ( currentFilesToRemove ) ;
585
- if ( liveSyncData . watchAllFiles ) {
586
-
587
- const platformData : IPlatformData = this . $platformsData . getPlatformData ( "android" , projectData ) ;
588
- const pluginInfo : any = [ ] ;
589
- allModifiedFiles . forEach ( async ( item ) => {
590
- const matchedItem = item . match ( / ( .* \/ n o d e _ m o d u l e s \/ [ \w - ] + ) \/ p l a t f o r m s \/ a n d r o i d \/ / ) ;
591
- if ( matchedItem ) {
592
- const matchLength = matchedItem [ 0 ] . length ;
593
- const matchIndex = item . indexOf ( matchedItem [ 0 ] ) ;
594
- const pluginInputOutputPath = item . substr ( 0 , matchIndex + matchLength ) ;
595
- const pluginPackageJason = require ( path . resolve ( matchedItem [ 1 ] , PACKAGE_JSON_FILE_NAME ) ) ;
596
-
597
- if ( pluginPackageJason && pluginPackageJason . name ) {
598
- const options : IBuildOptions = {
599
- pluginName : pluginPackageJason . name ,
600
- platformsAndroidDirPath : pluginInputOutputPath ,
601
- aarOutputDir : pluginInputOutputPath ,
602
- tempPluginDirPath : path . join ( projectData . platformsDir , "tempPlugin" )
603
- } ;
604
- pluginInfo . push ( options ) ;
605
- }
606
- }
607
- } ) ;
608
-
609
- const action = async ( buildAarOptions : IBuildOptions ) => {
610
- this . $logger . warn ( `Building ${ buildAarOptions . pluginName } ...` ) ;
611
- await platformData . platformProjectService . prebuildNativePlugin ( buildAarOptions ) ;
612
- } ;
613
564
614
- await executeActionByChunks < IBuildOptions > ( pluginInfo , DEFAULT_CHUNK_SIZE , action ) ;
615
- }
616
565
const preparedPlatforms : string [ ] = [ ] ;
617
566
const rebuiltInformation : ILiveSyncBuildInfo [ ] = [ ] ;
618
567
0 commit comments