Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
fail-fast: false
matrix:
include:
- ghidra: "12.1"
java: "21"
- ghidra: "12.0.4"
java: "21"
- ghidra: "12.0.3"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
fail-fast: false
matrix:
include:
- ghidra: "12.1"
java: "21"
- ghidra: "12.0.4"
java: "21"
- ghidra: "12.0.3"
Expand Down
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ test {
jvmArgs '--add-exports=java.desktop/sun.awt=ALL-UNNAMED'
// systemProperty 'java.awt.headless', 'true'
systemProperty "ghidra.test.property.batch.mode", 'true'

// Ghidra 12.1+ installs a serial filter factory during application initialization. The JVM
// only allows this if no ObjectInputStream has been constructed yet, but Gradle's test
// worker creates one for IPC before our tests run. Pre-installing the factory via system
// property avoids the IllegalStateException. The class only exists on 12.1+, so only set
// it when the installation actually has it.
def filterFactoryClass = 'ghidra.framework.remote.GhidraSerialFilterFactory'
def hasFilterFactory = fileTree(dir: "$ghidraInstallDir/Ghidra/Framework/FileSystem/lib",
include: '*.jar').any { jar ->
new java.util.zip.ZipFile(jar).withCloseable { zf ->
zf.getEntry(filterFactoryClass.replace('.', '/') + '.class') != null
}
}
if (hasFilterFactory) {
systemProperty 'jdk.serialFilterFactory', filterFactoryClass
}
}
// Exclude additional files from the built extension
// Ex: buildExtension.exclude '.idea/**'
Expand Down
Loading