File tree 1 file changed +12
-3
lines changed 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -131,9 +131,18 @@ class LibraryScanner {
131
131
String package, String packageDir) async {
132
132
Map <String , List <String >> results = new SplayTreeMap ();
133
133
List <String > dartFiles = await listFiles (packageDir, endsWith: '.dart' );
134
- List <String > mainFiles = dartFiles
135
- .where ((path) => path.startsWith ('lib/' ) || path.startsWith ('bin/' ))
136
- .toList ();
134
+ List <String > mainFiles = dartFiles.where ((path) {
135
+ if (p.isWithin ('bin' , path)) {
136
+ return true ;
137
+ }
138
+
139
+ // Include all Dart files in lib – except for implementation files.
140
+ if (p.isWithin ('lib' , path) && ! p.isWithin ('lib/src' , path)) {
141
+ return true ;
142
+ }
143
+
144
+ return false ;
145
+ }).toList ();
137
146
for (String relativePath in mainFiles) {
138
147
String uri = _toUri (package, relativePath);
139
148
if (! _cachedLibs.containsKey (uri)) {
You can’t perform that action at this time.
0 commit comments