Skip to content

Commit 3b94e7c

Browse files
authored
Merge pull request #1218 from keertip/sdk
Fix for duplicate libraries in SDK docs
2 parents 540fe2d + a0794af commit 3b94e7c

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

lib/dartdoc.dart

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,6 @@ const String version = '0.9.6+2';
4444

4545
final String defaultOutDir = p.join('doc', 'api');
4646

47-
/// Configure the dartdoc generation process
48-
void initializeConfig(
49-
{Directory inputDir,
50-
String sdkVersion,
51-
bool addCrossdart: false,
52-
bool includeSource: true}) {
53-
setConfig(
54-
inputDir: inputDir,
55-
sdkVersion: sdkVersion,
56-
addCrossdart: addCrossdart,
57-
includeSource: includeSource);
58-
}
59-
6047
/// Initialize and setup the generators.
6148
Future<List<Generator>> initGenerators(String url, List<String> headerFilePaths,
6249
List<String> footerFilePaths, String relCanonicalPrefix,
@@ -73,6 +60,19 @@ Future<List<Generator>> initGenerators(String url, List<String> headerFilePaths,
7360
];
7461
}
7562

63+
/// Configure the dartdoc generation process
64+
void initializeConfig(
65+
{Directory inputDir,
66+
String sdkVersion,
67+
bool addCrossdart: false,
68+
bool includeSource: true}) {
69+
setConfig(
70+
inputDir: inputDir,
71+
sdkVersion: sdkVersion,
72+
addCrossdart: addCrossdart,
73+
includeSource: includeSource);
74+
}
75+
7676
/// Generates Dart documentation for all public Dart libraries in the given
7777
/// directory.
7878
class DartDoc {
@@ -196,7 +196,8 @@ class DartDoc {
196196
..sourceFactory = sourceFactory;
197197

198198
if (packageMeta.isSdk) {
199-
libraries.addAll(getSdkLibrariesToDocument(sdk, context));
199+
libraries
200+
.addAll(new Set()..addAll(getSdkLibrariesToDocument(sdk, context)));
200201
}
201202

202203
List<Source> sources = [];

0 commit comments

Comments
 (0)