@@ -34,7 +34,7 @@ const _totalTimeout = Duration(minutes: 50);
3434
3535/// The dartdoc version to use.
3636/// keep in-sync with app/lib/shared/versions.dart
37- const _dartdocVersion = '8.1 .0' ;
37+ const _dartdocVersion = '8.3 .0' ;
3838
3939/// Program to be used as subprocess for running pana, ensuring that we capture
4040/// all the output, and only run analysis in a subprocess that can timeout and
@@ -99,8 +99,10 @@ Future<void> main(List<String> args) async {
9999 final pkgDir = Directory (p.join (pkgDownloadDir.path, '$package -$version ' ));
100100 final detected = await _detectSdks (pkgDir.path);
101101
102+ // Fallback for CI tests.
103+ // TODO: remove after runtime SDK is migrated to 3.6 SDK
102104 final dartdocVersion =
103- ( await _overrideDartdocVersion (pkgDir.path)) ?? _dartdocVersion;
105+ Platform .version. startsWith ( '3.5.' ) ? '8.1.0' : _dartdocVersion;
104106
105107 final toolEnv = await ToolEnvironment .create (
106108 dartSdkConfig: SdkConfig (
@@ -194,21 +196,6 @@ String? _configHomePath(String sdk, String kind) {
194196 return path;
195197}
196198
197- /// Detects the package dependencies and overrides the dartdoc version to
198- /// 8.3.0 if macros is being used.
199- ///
200- /// TODO: remove this after the 3.6 SDK is released.
201- Future <String ?> _overrideDartdocVersion (String pkgDir) async {
202- final pubspecFile = File (p.join (pkgDir, 'pubspec.yaml' ));
203- final pubspec = Pubspec .parseYaml (await pubspecFile.readAsString ());
204- final minMacrosVersion = pubspec.getDependencyContraintRangeMin ('macros' );
205- if (minMacrosVersion != null &&
206- minMacrosVersion.compareTo (Version .parse ('0.1.3-main.0' )) >= 0 ) {
207- return '8.3.0' ;
208- }
209- return null ;
210- }
211-
212199Future <({String configKind, String ? dartSdkPath, String ? flutterSdkPath})>
213200 _detectSdks (String pkgDir) async {
214201 // Load the pubspec so we detect which SDK to use for analysis
0 commit comments