Skip to content

Commit f5bf437

Browse files
committed
[tool] Address review feedback on BuildAarCommand and BuildSubCommand
1 parent 0b69120 commit f5bf437

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎packages/flutter_tools/lib/src/commands/build_aar.dart‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import '../android/android_sdk.dart';
1010
import '../android/gradle_utils.dart';
1111
import '../base/common.dart';
1212
import '../base/file_system.dart';
13-
import '../base/logger.dart';
1413
import '../base/os.dart';
1514
import '../build_info.dart';
1615
import '../build_system/build_system.dart';
@@ -80,15 +79,19 @@ class BuildAarCommand extends BuildSubCommand {
8079
final AndroidContext _androidContext;
8180
final BuildSystem _buildSystem;
8281

82+
/// The [AndroidBuilder] used to build the AAR.
8383
@visibleForTesting
8484
AndroidBuilder get androidBuilder => _androidBuilder;
8585

86+
/// The [AndroidContext] containing Android-specific toolchain dependencies.
8687
@visibleForTesting
8788
AndroidContext get androidContext => _androidContext;
8889

90+
/// The [AndroidSdk] instance, if available.
8991
@visibleForTesting
9092
AndroidSdk? get androidSdk => _androidContext.androidSdk;
9193

94+
/// The [BuildSystem] used for building the project.
9295
@visibleForTesting
9396
BuildSystem get buildSystem => _buildSystem;
9497

@@ -150,8 +153,7 @@ class BuildAarCommand extends BuildSubCommand {
150153

151154
@override
152155
Future<FlutterCommandResult> runCommand() async {
153-
final Logger logger = toolContext.logger;
154-
if (androidSdk == null) {
156+
if (_androidContext.androidSdk == null) {
155157
exitWithNoSdkMessage(analytics: analytics, logger: logger);
156158
}
157159
final androidBuildInfo = <AndroidBuildInfo>{};

0 commit comments

Comments
 (0)