mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-04-25 17:25:17 +02:00
committed by
Ryan Kurtz
parent
dfc4ec586a
commit
d160f22f09
@@ -287,28 +287,27 @@ tasks.register('indexHelp', JavaExec) {
|
||||
// Task for building Markdown in src/global/docs to HTML
|
||||
// - the files generated will be placed in a build directory usable during development mode
|
||||
tasks.register('buildGlobalMarkdown') {
|
||||
group = "private"
|
||||
group = "private"
|
||||
dependsOn ':MarkdownSupport:classes'
|
||||
|
||||
|
||||
FileTree markdownFiles = this.project.fileTree('src/global/docs') {
|
||||
include '*.md'
|
||||
}
|
||||
|
||||
|
||||
onlyIf ("There are no markdown files") { !markdownFiles.isEmpty() }
|
||||
|
||||
inputs.files markdownFiles
|
||||
|
||||
inputs.files markdownFiles
|
||||
|
||||
def markdownProject = project(':MarkdownSupport')
|
||||
|
||||
doFirst {
|
||||
doLast {
|
||||
markdownFiles.each { f ->
|
||||
def htmlName = f.name[0..-3] + "html"
|
||||
providers.javaexec {
|
||||
classpath = markdownProject.sourceSets.main.runtimeClasspath
|
||||
mainClass = 'ghidra.markdown.MarkdownToHtml'
|
||||
args f
|
||||
args file("build/src/global/docs/${htmlName}")
|
||||
}.result.get()
|
||||
def htmlFile = "build/src/global/docs/" + f.name[0..-3] + "html"
|
||||
[
|
||||
'java',
|
||||
'-cp', project.files(rootProject.ext.mdDeps).asPath,
|
||||
'ghidra.markdown.MarkdownToHtml',
|
||||
f,
|
||||
file(htmlFile)
|
||||
].execute()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -540,29 +540,29 @@ task assembleSource (type: Copy) {
|
||||
|
||||
/************************************************************************************
|
||||
*
|
||||
* Copies a markdown file and a generaterated html file into the distribution folder.
|
||||
* Copies markdown files and generaterate html files into the distribution folder.
|
||||
*
|
||||
************************************************************************************/
|
||||
task assembleMarkdownToHtml (type: Copy) {
|
||||
group = 'private'
|
||||
description = "Copies a markdown file and a generaterated html file into the distribution folder"
|
||||
description = "Copies markdown files and generaterate html files into the distribution folder"
|
||||
|
||||
dependsOn ':MarkdownSupport:classes'
|
||||
outputs.upToDateWhen {false}
|
||||
destinationDir = file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
|
||||
|
||||
def markdownSuppportProject = project(':MarkdownSupport')
|
||||
|
||||
eachFile { f ->
|
||||
def htmlName = f.sourceName[0..-3] + "html"
|
||||
def htmlPath = f.relativePath.replaceLastName(htmlName).pathString
|
||||
|
||||
providers.javaexec {
|
||||
classpath = markdownSuppportProject.sourceSets.main.runtimeClasspath
|
||||
mainClass = 'ghidra.markdown.MarkdownToHtml'
|
||||
args f.file
|
||||
args file("${destinationDir.path}/${htmlPath}")
|
||||
}.result.get()
|
||||
doLast {
|
||||
eachFile { f ->
|
||||
def htmlName = f.sourceName[0..-3] + "html"
|
||||
def htmlPath = f.relativePath.replaceLastName(htmlName).pathString
|
||||
[
|
||||
'java',
|
||||
'-cp', project.files(rootProject.ext.mdDeps).asPath,
|
||||
'ghidra.markdown.MarkdownToHtml',
|
||||
f.file,
|
||||
file("${destinationDir.path}/${htmlPath}")
|
||||
].execute()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user