mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-02-05 11:05:28 +08:00
GP-6385: Some more gradle tweaks
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -53,7 +53,9 @@ dependencies {
|
||||
|
||||
evaluationDependsOn(p.path)
|
||||
|
||||
api p
|
||||
p.plugins.withType(JavaPlugin) {
|
||||
api p
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@ dependencies {
|
||||
}
|
||||
|
||||
project.afterEvaluate {
|
||||
rootProject.ext.mdDeps.clear()
|
||||
rootProject.ext.markdownDeps.clear()
|
||||
configurations.runtimeClasspath.resolve().each { File f ->
|
||||
rootProject.ext.mdDeps.add(f.getAbsolutePath())
|
||||
rootProject.ext.markdownDeps.add(f.getAbsolutePath())
|
||||
}
|
||||
|
||||
sourceSets.main.output.files.each { File f ->
|
||||
rootProject.ext.mdDeps.add(f.getAbsolutePath())
|
||||
rootProject.ext.markdownDeps.add(f.getAbsolutePath())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ else {
|
||||
* Force all project compile classpaths to be resolved at configuration time.
|
||||
*********************************************************************************/
|
||||
allprojects {
|
||||
afterEvaluate {
|
||||
gradle.taskGraph.whenReady {
|
||||
configurations.matching { it.name.endsWith("compileClasspath") }.all { cfg ->
|
||||
if (cfg.canBeResolved) {
|
||||
try {
|
||||
@@ -107,7 +107,7 @@ allprojects {
|
||||
/*********************************************************************************
|
||||
* Store :MarkdownSupport ClassPath to fix issues with Gradle 9.
|
||||
*********************************************************************************/
|
||||
ext.mdDeps = []
|
||||
ext.markdownDeps = []
|
||||
|
||||
/*********************************************************************************
|
||||
* Imports
|
||||
|
||||
@@ -300,14 +300,13 @@ tasks.register('buildGlobalMarkdown') {
|
||||
|
||||
doLast {
|
||||
markdownFiles.each { f ->
|
||||
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()
|
||||
def htmlName = f.name[0..-3] + "html"
|
||||
providers.javaexec {
|
||||
classpath = rootProject.files(rootProject.ext.markdownDeps)
|
||||
mainClass = 'ghidra.markdown.MarkdownToHtml'
|
||||
args f
|
||||
args file("build/src/global/docs/${htmlName}")
|
||||
}.result.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -551,18 +551,16 @@ task assembleMarkdownToHtml (type: Copy) {
|
||||
outputs.upToDateWhen {false}
|
||||
destinationDir = file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
|
||||
|
||||
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()
|
||||
}
|
||||
eachFile { f ->
|
||||
def htmlName = f.sourceName[0..-3] + "html"
|
||||
def htmlPath = f.relativePath.replaceLastName(htmlName).pathString
|
||||
|
||||
providers.javaexec {
|
||||
classpath = rootProject.files(rootProject.ext.markdownDeps)
|
||||
mainClass = 'ghidra.markdown.MarkdownToHtml'
|
||||
args f.file
|
||||
args file("${destinationDir.path}/${htmlPath}")
|
||||
}.result.get()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user