From d37a1277601fccfcc6afaaa8ca3d7081b85899ec Mon Sep 17 00:00:00 2001 From: Kallen Tu Date: Wed, 29 Nov 2023 23:36:57 +0000 Subject: [PATCH] Deprecate public exports in lib/dartdoc.dart. --- bin/dartdoc.dart | 5 ++++- lib/dartdoc.dart | 1 + lib/options.dart | 2 +- test/end2end/dartdoc_test.dart | 2 +- test/html_generator_test.dart | 2 +- test/mustachio/renderers_output_test.dart | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bin/dartdoc.dart b/bin/dartdoc.dart index 52781d967b..1e78f1b6ed 100644 --- a/bin/dartdoc.dart +++ b/bin/dartdoc.dart @@ -6,8 +6,11 @@ library dartdoc.bin; import 'dart:async'; -import 'package:dartdoc/dartdoc.dart'; import 'package:dartdoc/options.dart'; +import 'package:dartdoc/src/dartdoc.dart'; +import 'package:dartdoc/src/model/model.dart'; +import 'package:dartdoc/src/package_config_provider.dart'; +import 'package:dartdoc/src/package_meta.dart'; /// Analyzes Dart files and generates a representation of included libraries, /// classes, and members. Uses the current directory to look for libraries. diff --git a/lib/dartdoc.dart b/lib/dartdoc.dart index b4769ecc6c..d7cacc8d21 100644 --- a/lib/dartdoc.dart +++ b/lib/dartdoc.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// A documentation generator for Dart. +@Deprecated('Will be removed in a later version of DartDoc.') library dartdoc; export 'package:dartdoc/src/dartdoc.dart'; diff --git a/lib/options.dart b/lib/options.dart index 6724c1423f..6610d83909 100644 --- a/lib/options.dart +++ b/lib/options.dart @@ -1,7 +1,7 @@ import 'dart:io' show stderr, exitCode; import 'package:args/args.dart'; -import 'package:dartdoc/dartdoc.dart' show dartdocVersion, programName; +import 'package:dartdoc/src/dartdoc.dart' show dartdocVersion, programName; import 'package:dartdoc/src/dartdoc_options.dart'; import 'package:dartdoc/src/generator/generator.dart'; import 'package:dartdoc/src/logging.dart'; diff --git a/test/end2end/dartdoc_test.dart b/test/end2end/dartdoc_test.dart index 16ed7aec9b..7680327003 100644 --- a/test/end2end/dartdoc_test.dart +++ b/test/end2end/dartdoc_test.dart @@ -7,8 +7,8 @@ library dartdoc.dartdoc_test; import 'dart:async'; import 'package:analyzer/file_system/file_system.dart'; -import 'package:dartdoc/dartdoc.dart' show Dartdoc, DartdocResults; import 'package:dartdoc/options.dart'; +import 'package:dartdoc/src/dartdoc.dart' show Dartdoc, DartdocResults; import 'package:dartdoc/src/dartdoc_options.dart'; import 'package:dartdoc/src/failure.dart'; import 'package:dartdoc/src/io_utils.dart'; diff --git a/test/html_generator_test.dart b/test/html_generator_test.dart index 6b373451d6..93451d8008 100644 --- a/test/html_generator_test.dart +++ b/test/html_generator_test.dart @@ -4,8 +4,8 @@ import 'package:analyzer/file_system/file_system.dart'; import 'package:analyzer/file_system/memory_file_system.dart'; -import 'package:dartdoc/dartdoc.dart' show DartdocFileWriter; import 'package:dartdoc/options.dart'; +import 'package:dartdoc/src/dartdoc.dart' show DartdocFileWriter; import 'package:dartdoc/src/dartdoc_options.dart'; import 'package:dartdoc/src/generator/generator.dart'; import 'package:dartdoc/src/generator/generator_backend.dart'; diff --git a/test/mustachio/renderers_output_test.dart b/test/mustachio/renderers_output_test.dart index 1467834084..227dea28f8 100644 --- a/test/mustachio/renderers_output_test.dart +++ b/test/mustachio/renderers_output_test.dart @@ -9,8 +9,8 @@ import 'dart:io'; import 'package:analyzer/file_system/file_system.dart'; import 'package:analyzer/file_system/memory_file_system.dart'; -import 'package:dartdoc/dartdoc.dart' show Dartdoc, DartdocFileWriter; import 'package:dartdoc/options.dart'; +import 'package:dartdoc/src/dartdoc.dart' show Dartdoc, DartdocFileWriter; import 'package:dartdoc/src/dartdoc_options.dart'; import 'package:dartdoc/src/generator/generator.dart'; import 'package:dartdoc/src/generator/html_generator.dart';