Merge remote-tracking branch

'origin/GP-6385_ryanmkurtz_PR-8622_jobermayr_gradle9-parallel'
(Closes #8621, Closes #8622)
This commit is contained in:
Ryan Kurtz
2026-02-02 12:31:39 -05:00
9 changed files with 77 additions and 38 deletions
+11 -9
View File
@@ -82,15 +82,17 @@ String getSevenZipJarPath() {
}
task extractSevenZipNativeLibs(type: Copy) {
String jarPath = getSevenZipJarPath();
from zipTree(jarPath)
include "Linux-amd64/*.so"
include "Windows-amd64/*.dll"
include "Mac-x86_64/*.dylib"
exclude "META-INF"
exclude "Linux-i386"
exclude "Windows-x86"
into ("build/data/sevenzipnativelibs")
gradle.taskGraph.whenReady {
String jarPath = getSevenZipJarPath();
from zipTree(jarPath)
include "Linux-amd64/*.so"
include "Windows-amd64/*.dll"
include "Mac-x86_64/*.dylib"
exclude "META-INF"
exclude "Linux-i386"
exclude "Windows-x86"
into ("build/data/sevenzipnativelibs")
}
}
rootProject.prepDev.dependsOn extractSevenZipNativeLibs
+6 -4
View File
@@ -45,10 +45,12 @@ task jythonUnpack(type: Copy) {
!file("build/data/${JYTHON_DIR}").exists()
}
from zipTree(configurations.jython.singleFile)
include "Lib/**"
destinationDir = file("build/data/${JYTHON_DIR}")
gradle.taskGraph.whenReady {
from zipTree(configurations.jython.singleFile)
include "Lib/**"
destinationDir = file("build/data/${JYTHON_DIR}")
}
}
task jythonSrcCopy(type: Copy) {
+1 -1
View File
@@ -55,7 +55,7 @@ def getAllHelpTasks() {
*/
tasks.register('buildHelp') {
description 'Build all Ghidra help'
description = 'Build all Ghidra help'
dependsOn { getAllHelpTasks() } // all 'buildHelpModule' tasks
dependsOn 'validateHelpTocFiles' // the validate TOC task to run after all help is built
@@ -44,17 +44,19 @@ dependencies {
def ghidraPath = projectDir.getParentFile().getParentFile().path.replace(File.separator, "/") + "/";
rootProject.subprojects { p ->
p.plugins.withType(JavaPlugin) {
def projectPath = p.projectDir.path.replace(File.separator, "/")
if (projectPath.startsWith(ghidraPath) && (
projectPath.contains("/Framework/") ||
projectPath.contains("/Features/") ||
projectPath.contains("/Debug/") ||
projectPath.contains("/Processors/"))) {
def projectPath = p.projectDir.path.replace(File.separator, "/")
if (projectPath.startsWith(ghidraPath) && (
projectPath.contains("/Framework/") ||
projectPath.contains("/Features/") ||
projectPath.contains("/Debug/") ||
projectPath.contains("/Processors/"))) {
evaluationDependsOn(p.path)
p.plugins.withType(JavaPlugin) {
api p
}
}
}
}
// some tests use classes in Base, FunctionGraph and PDB
+8 -2
View File
@@ -27,6 +27,12 @@ dependencies {
api "com.google.code.gson:gson:2.9.0"
}
rootProject.createJsondocs.dependsOn jar
rootProject.createPythonTypeStubs.dependsOn jar
def jsonTask = rootProject.tasks.findByName("createJsondocs") ?: rootProject.tasks.findByName("createJsonDocs")
if (jsonTask != null) {
jsonTask.dependsOn(jar)
}
def stubTask = rootProject.tasks.findByName("createPythonTypeStubs")
if (stubTask != null) {
stubTask.dependsOn(jar)
}
+11
View File
@@ -23,3 +23,14 @@ dependencies {
implementation 'org.commonmark:commonmark-ext-footnotes:0.23.0'
implementation 'org.commonmark:commonmark-ext-gfm-tables:0.23.0'
}
project.afterEvaluate {
rootProject.ext.markdownDeps.clear()
configurations.runtimeClasspath.resolve().each { File f ->
rootProject.ext.markdownDeps.add(f.getAbsolutePath())
}
sourceSets.main.output.files.each { File f ->
rootProject.ext.markdownDeps.add(f.getAbsolutePath())
}
}
+20
View File
@@ -89,6 +89,26 @@ else {
}
}
/*********************************************************************************
* Force all project compile classpaths to be resolved at configuration time.
*********************************************************************************/
allprojects {
gradle.taskGraph.whenReady {
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.markdownDeps = []
/*********************************************************************************
* Imports
* For these tasks to be available on all subprojects, this MUST be placed
+7 -9
View File
@@ -287,24 +287,22 @@ 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
classpath = rootProject.files(rootProject.ext.markdownDeps)
mainClass = 'ghidra.markdown.MarkdownToHtml'
args f
args file("build/src/global/docs/${htmlName}")
+3 -5
View File
@@ -540,25 +540,23 @@ 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
classpath = rootProject.files(rootProject.ext.markdownDeps)
mainClass = 'ghidra.markdown.MarkdownToHtml'
args f.file
args file("${destinationDir.path}/${htmlPath}")