Skip to content

Commit

Permalink
Increase the minimum SDK version and enable private field promotion
Browse files Browse the repository at this point in the history
  • Loading branch information
swift-kim committed Mar 1, 2024
1 parent 24bac6e commit 1efdc43
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions lib/tizen_device_discovery.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ class TizenDeviceDiscovery extends PollingDeviceDiscovery {

@override
Future<List<Device>> pollingGetDevices({Duration? timeout}) async {
if (_tizenSdk == null || !_tizenSdk!.sdb.existsSync()) {
if (_tizenSdk == null || !_tizenSdk.sdb.existsSync()) {
return <TizenDevice>[];
}

final RunResult result =
await _processUtils.run(<String>[_tizenSdk!.sdb.path, 'devices']);
await _processUtils.run(<String>[_tizenSdk.sdb.path, 'devices']);
if (result.exitCode != 0) {
throwToolExit('sdb failed to list attached devices:\n$result');
}
Expand Down Expand Up @@ -89,7 +89,7 @@ class TizenDeviceDiscovery extends PollingDeviceDiscovery {
modelId: deviceModel,
logger: _logger,
processManager: _processManager,
tizenSdk: _tizenSdk!,
tizenSdk: _tizenSdk,
fileSystem: _fileSystem,
);

Expand All @@ -114,7 +114,7 @@ class TizenDeviceDiscovery extends PollingDeviceDiscovery {
}

final RunResult result =
await _processUtils.run(<String>[_tizenSdk!.sdb.path, 'devices']);
await _processUtils.run(<String>[_tizenSdk.sdb.path, 'devices']);
if (result.exitCode != 0) {
return <String>[];
}
Expand Down
20 changes: 10 additions & 10 deletions lib/tizen_doctor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ class TizenValidator extends DoctorValidator {

bool _validatePackages(List<ValidationMessage> messages) {
final String gccVersion = _tizenSdk!.defaultGccVersion;
final String packageManager = _tizenSdk!.packageManagerCli.path;
final String packageManager = _tizenSdk.packageManagerCli.path;
final List<String> missingPackages = <String>[];

if (!_tizenSdk!.tizenCli.existsSync()) {
if (!_tizenSdk.tizenCli.existsSync()) {
missingPackages.add('NativeCLI');
}
if (!_tizenSdk!.toolsDirectory
if (!_tizenSdk.toolsDirectory
.childDirectory('arm-linux-gnueabi-gcc-$gccVersion')
.existsSync()) {
missingPackages.add('NativeToolchain-Gcc-$gccVersion');
}
if (!_tizenSdk!.platformsDirectory
if (!_tizenSdk.platformsDirectory
.childDirectory('tizen-5.5')
.childDirectory('wearable')
.childDirectory('rootstraps')
Expand Down Expand Up @@ -136,28 +136,28 @@ class TizenValidator extends DoctorValidator {
return ValidationResult(ValidationType.missing, messages);
}

final Version? sdkVersion = Version.parse(_tizenSdk!.sdkVersion);
final Version? sdkVersion = Version.parse(_tizenSdk.sdkVersion);
if (sdkVersion != null && sdkVersion < Version(5, 0, 0)) {
messages.add(ValidationMessage.error(
'A newer version of Tizen Studio is required. To update, run:\n'
'${_tizenSdk!.packageManagerCli.path} update',
'${_tizenSdk.packageManagerCli.path} update',
));
return ValidationResult(ValidationType.missing, messages);
} else {
final String versionText = sdkVersion != null ? ' $sdkVersion' : '';
messages.add(ValidationMessage(
'Tizen Studio$versionText at ${_tizenSdk!.directory.path}',
'Tizen Studio$versionText at ${_tizenSdk.directory.path}',
));
}

if (!_validatePackages(messages)) {
return ValidationResult(ValidationType.partial, messages);
}

if (_dotnetCli != null && _processManager.canRun(_dotnetCli!.path)) {
if (_dotnetCli != null && _processManager.canRun(_dotnetCli.path)) {
final Version? dotnetVersion = Version.parse(
_processUtils
.runSync(<String>[_dotnetCli!.path, '--version'])
.runSync(<String>[_dotnetCli.path, '--version'])
.stdout
.trim(),
);
Expand All @@ -169,7 +169,7 @@ class TizenValidator extends DoctorValidator {
return ValidationResult(ValidationType.missing, messages);
} else {
messages.add(ValidationMessage(
'.NET SDK $dotnetVersion at ${_dotnetCli!.path}',
'.NET SDK $dotnetVersion at ${_dotnetCli.path}',
));
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ homepage: https://github.com/flutter-tizen/flutter-tizen
publish_to: "none"

environment:
sdk: ">=2.18.0 <4.0.0"
sdk: ">=3.3.0 <4.0.0"

dependencies:
analyzer:
Expand Down

0 comments on commit 1efdc43

Please sign in to comment.