Skip to content

Commit

Permalink
Dont assume there has to be a main.dart for a flutter app/package
Browse files Browse the repository at this point in the history
  • Loading branch information
acoutts committed Apr 29, 2022
1 parent b006a68 commit ad3e80e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/melos/lib/src/package.dart
Original file line number Diff line number Diff line change
Expand Up @@ -814,15 +814,14 @@ class Package {
/// This is determined by ensuring all the following conditions are met:
/// a) the package depends on the Flutter SDK.
/// b) the package does not define itself as a Flutter plugin inside pubspec.yaml.
/// c) a lib/main.dart file exists in the package.
bool get isFlutterApp {
// Must directly depend on the Flutter SDK.
if (!isFlutterPackage) return false;

// Must not have a Flutter plugin definition in it's pubspec.yaml.
if (pubSpec.flutter?.plugin != null) return false;

return File(joinAll([path, 'lib', 'main.dart'])).existsSync();
return true;
}

bool get isAddToApp {
Expand Down

0 comments on commit ad3e80e

Please sign in to comment.