mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 22:30:19 +08:00
committed by
Ryan Kurtz
parent
dfc4ec586a
commit
d160f22f09
@@ -44,16 +44,16 @@ dependencies {
|
|||||||
def ghidraPath = projectDir.getParentFile().getParentFile().path.replace(File.separator, "/") + "/";
|
def ghidraPath = projectDir.getParentFile().getParentFile().path.replace(File.separator, "/") + "/";
|
||||||
|
|
||||||
rootProject.subprojects { p ->
|
rootProject.subprojects { p ->
|
||||||
p.plugins.withType(JavaPlugin) {
|
def projectPath = p.projectDir.path.replace(File.separator, "/")
|
||||||
def projectPath = p.projectDir.path.replace(File.separator, "/")
|
if (projectPath.startsWith(ghidraPath) && (
|
||||||
if (projectPath.startsWith(ghidraPath) && (
|
projectPath.contains("/Framework/") ||
|
||||||
projectPath.contains("/Framework/") ||
|
projectPath.contains("/Features/") ||
|
||||||
projectPath.contains("/Features/") ||
|
projectPath.contains("/Debug/") ||
|
||||||
projectPath.contains("/Debug/") ||
|
projectPath.contains("/Processors/"))) {
|
||||||
projectPath.contains("/Processors/"))) {
|
|
||||||
|
|
||||||
api p
|
evaluationDependsOn(p.path)
|
||||||
}
|
|
||||||
|
api p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,12 @@ dependencies {
|
|||||||
api "com.google.code.gson:gson:2.9.0"
|
api "com.google.code.gson:gson:2.9.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.createJsondocs.dependsOn jar
|
def jsonTask = rootProject.tasks.findByName("createJsondocs") ?: rootProject.tasks.findByName("createJsonDocs")
|
||||||
rootProject.createPythonTypeStubs.dependsOn jar
|
if (jsonTask != null) {
|
||||||
|
jsonTask.dependsOn(jar)
|
||||||
|
}
|
||||||
|
|
||||||
|
def stubTask = rootProject.tasks.findByName("createPythonTypeStubs")
|
||||||
|
if (stubTask != null) {
|
||||||
|
stubTask.dependsOn(jar)
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,3 +23,14 @@ dependencies {
|
|||||||
implementation 'org.commonmark:commonmark-ext-footnotes:0.23.0'
|
implementation 'org.commonmark:commonmark-ext-footnotes:0.23.0'
|
||||||
implementation 'org.commonmark:commonmark-ext-gfm-tables:0.23.0'
|
implementation 'org.commonmark:commonmark-ext-gfm-tables:0.23.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
project.afterEvaluate {
|
||||||
|
rootProject.ext.mdDeps.clear()
|
||||||
|
configurations.runtimeClasspath.resolve().each { File f ->
|
||||||
|
rootProject.ext.mdDeps.add(f.getAbsolutePath())
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets.main.output.files.each { File f ->
|
||||||
|
rootProject.ext.mdDeps.add(f.getAbsolutePath())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -89,6 +89,26 @@ else {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************************************************
|
||||||
|
* Force all project compile classpaths to be resolved at configuration time.
|
||||||
|
*********************************************************************************/
|
||||||
|
allprojects {
|
||||||
|
afterEvaluate {
|
||||||
|
configurations.matching { it.name.endsWith("compileClasspath") }.all { cfg ->
|
||||||
|
if (cfg.canBeResolved) {
|
||||||
|
try {
|
||||||
|
cfg.files // trigger resolution safely now
|
||||||
|
} catch (ignored) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************************************************
|
||||||
|
* Store :MarkdownSupport ClassPath to fix issues with Gradle 9.
|
||||||
|
*********************************************************************************/
|
||||||
|
ext.mdDeps = []
|
||||||
|
|
||||||
/*********************************************************************************
|
/*********************************************************************************
|
||||||
* Imports
|
* Imports
|
||||||
* For these tasks to be available on all subprojects, this MUST be placed
|
* For these tasks to be available on all subprojects, this MUST be placed
|
||||||
|
|||||||
@@ -298,17 +298,16 @@ tasks.register('buildGlobalMarkdown') {
|
|||||||
|
|
||||||
inputs.files markdownFiles
|
inputs.files markdownFiles
|
||||||
|
|
||||||
def markdownProject = project(':MarkdownSupport')
|
doLast {
|
||||||
|
|
||||||
doFirst {
|
|
||||||
markdownFiles.each { f ->
|
markdownFiles.each { f ->
|
||||||
def htmlName = f.name[0..-3] + "html"
|
def htmlFile = "build/src/global/docs/" + f.name[0..-3] + "html"
|
||||||
providers.javaexec {
|
[
|
||||||
classpath = markdownProject.sourceSets.main.runtimeClasspath
|
'java',
|
||||||
mainClass = 'ghidra.markdown.MarkdownToHtml'
|
'-cp', project.files(rootProject.ext.mdDeps).asPath,
|
||||||
args f
|
'ghidra.markdown.MarkdownToHtml',
|
||||||
args file("build/src/global/docs/${htmlName}")
|
f,
|
||||||
}.result.get()
|
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) {
|
task assembleMarkdownToHtml (type: Copy) {
|
||||||
group = 'private'
|
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'
|
dependsOn ':MarkdownSupport:classes'
|
||||||
outputs.upToDateWhen {false}
|
outputs.upToDateWhen {false}
|
||||||
destinationDir = file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
|
destinationDir = file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
|
||||||
|
|
||||||
def markdownSuppportProject = project(':MarkdownSupport')
|
doLast {
|
||||||
|
eachFile { f ->
|
||||||
eachFile { f ->
|
def htmlName = f.sourceName[0..-3] + "html"
|
||||||
def htmlName = f.sourceName[0..-3] + "html"
|
def htmlPath = f.relativePath.replaceLastName(htmlName).pathString
|
||||||
def htmlPath = f.relativePath.replaceLastName(htmlName).pathString
|
[
|
||||||
|
'java',
|
||||||
providers.javaexec {
|
'-cp', project.files(rootProject.ext.mdDeps).asPath,
|
||||||
classpath = markdownSuppportProject.sourceSets.main.runtimeClasspath
|
'ghidra.markdown.MarkdownToHtml',
|
||||||
mainClass = 'ghidra.markdown.MarkdownToHtml'
|
f.file,
|
||||||
args f.file
|
file("${destinationDir.path}/${htmlPath}")
|
||||||
args file("${destinationDir.path}/${htmlPath}")
|
].execute()
|
||||||
}.result.get()
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user