Skip to content

Refactor DocPublisher, PdfBuilder and PublishPdfTask #1059

@rainboyan

Description

@rainboyan

Currently, PdfPublisher only calls PdfBuilder and does not provide additional methods, so it should be removed.

DocPublisher plays an important role in document publishing; it currently provides generating the HTML documents but can use PdfBuilder to generate PDF documents. In the future, it may also support EPUB format documents.

External Gradle tasks should uniformly use DocPublisher instead of PdfPublisher.

  • Refactor PdfBuilder
    • Make build() create*() methods as instance methods rather than static methods
    • Prefer to user build() to generate pdf
  • Refactor DocPublisher
    • Add new method publishPdf() to DocPublisher, it call PdfBuilder.build()
    • Add two properties singleHtml and singlePdf, now you can customize file name of the generated html and pdf
    • Improve the log messages
  • Refactor PublishPdfTask
    • Call DocPublisher.publishPdf()
    • Add new properties targetDir singleHtml and singlePdf
  • Add new property singleHtml to PublishGuideTask
  • Remove PdfPublisher and PdfPublisherSpec

Metadata

Metadata

Assignees

Labels

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions