Skip to content

Commit

Permalink
Release v2.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrr Hak authored and Mrr Hak committed Dec 4, 2023
1 parent cbcf22e commit e7a34c8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ jobs:

- name: Analyze
run: dart analyze --fatal-infos --fatal-warnings .

- name: Test
run: dart test
3 changes: 2 additions & 1 deletion lib/src/android.dart
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,8 @@ int _minSdk() {
minSdkValue = _getLineValueNumber(flutterLines, flutterLineKey);
}

return int.tryParse(minSdkValue ?? '0') ?? 0;
if (minSdkValue != null) return int.tryParse(minSdkValue) ?? 0;
return ANDROID_DEFAULT_MIN_SDK;
}

/// Retrieves the flutter sdk path
Expand Down
4 changes: 4 additions & 0 deletions lib/utils/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ const String END_MESSAGE = '''\n
const String FLUTTER_SDK_GRADLE_FILE =
'/packages/flutter_tools/gradle/flutter.gradle';

/// Default min_sdk value for android
/// https://github.com/flutter/flutter/blob/master/packages/flutter_tools/gradle/flutter.gradle#L35-L37
const int ANDROID_DEFAULT_MIN_SDK = 21;

/// Android local properties file location
const String ANDROID_LOCAL_PROPERTIES = 'android/local.properties';

Expand Down
4 changes: 2 additions & 2 deletions test/main_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void main() {
// Read yaml config file
final file = File('pubspec.yaml');
final content = file.readAsStringSync();
final yaml = loadYaml(content) as Map<String, dynamic>;
final yaml = loadYaml(content) as Map;

expect(packageVersion, yaml['version'].toString(),
reason: 'Version is not correct');
Expand All @@ -20,7 +20,7 @@ void main() {
// Read yaml config file
final file = File('pubspec.yaml');
final content = file.readAsStringSync();
final yaml = loadYaml(content) as Map<String, dynamic>;
final yaml = loadYaml(content) as Map;

final length = yaml['description'].toString().length;
expect(length, greaterThan(60),
Expand Down

0 comments on commit e7a34c8

Please sign in to comment.