A Gradle plugin to compile Markdown to HTML and PDF. This plugin is a wrapper around:
Applying this plugin implicitly applies the base plugin to your project.
This plugin adds the following tasks:
- compileMarkdownToHtml: Compile a Markdown file to a HTML file.
- compileHtmlToPdf: Compile a HTML file to a PDF file.
- compileMarkdownToPdf: Compile a Markdown file to a PDF file (uses above tasks internally).
plugins {
id 'nl.martijndwars.markdown' version '0.2.0'
id 'maven-publish'
}
group = 'org.example'
version = '1.2.3'
description = 'Simple example'
repositories {
jcenter()
}
compileMarkdownToHtml {
inputFile = file("text.md")
}
compileHtmlToPdf {
outputFile = file("$buildDir/text.pdf")
}
compileHtmlToPdf.inputFile = compileMarkdownToHtml.outputFile
compileMarkdownToHtml.outputFile = file("$buildDir/text.html")
task textZip(type: Zip) {
destinationDirectory = file("$buildDir/dist")
from compileHtmlToPdf.outputFile
}
publishing {
publications {
simple(MavenPublication) {
artifact textZip
}
}
}