Skip to content

Commit

Permalink
chore!: don't sync deps automatically before build
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyashsaitwal committed Jan 15, 2024
1 parent 0afa249 commit 5de0298
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions lib/src/commands/build/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import 'package:tint/tint.dart';
import 'package:rush_cli/src/commands/build/utils.dart';
import 'package:rush_cli/src/commands/build/tools/compiler.dart';
import 'package:rush_cli/src/commands/build/tools/executor.dart';
import 'package:rush_cli/src/commands/deps/sync.dart';
import 'package:rush_cli/src/config/config.dart';
import 'package:rush_cli/src/resolver/artifact.dart';
import 'package:rush_cli/src/services/lib_service.dart';
Expand Down Expand Up @@ -58,33 +57,11 @@ class BuildCommand extends Command<int> {
_lgr.stopTask(false);
return 1;
}

final timestampBox = await Hive.openLazyBox<DateTime>(timestampBoxName);

final needSync = await SyncSubCommand.extensionDepsNeedSync(
timestampBox, await _libService.extensionDependencies(config));
if (needSync) {
final dependencies = config.dependencies
.whereNot((el) => el.endsWith('.jar') || el.endsWith('.aar'));

try {
await SyncSubCommand().sync(
cacheBox: _libService.extensionDepsBox,
coordinates: {Scope.compile: dependencies},
providedArtifacts: await _libService.providedDependencies(config),
repositories: config.repositories,
downloadSources: true,
);
await timestampBox.put(configTimestampKey, DateTime.now());
} catch (e, s) {
_catchAndStop(e, s);
return 1;
}
}
_lgr.stopTask();

_lgr.startTask('Compiling sources');
try {
final timestampBox = await Hive.openLazyBox<DateTime>(timestampBoxName);
await _mergeManifests(
config,
timestampBox,
Expand Down

0 comments on commit 5de0298

Please sign in to comment.