Skip to content
This repository was archived by the owner on Nov 16, 2025. It is now read-only.
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
31 changes: 4 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build with Maven
name: Build with Gradle

on:
push:
Expand All @@ -12,15 +12,6 @@ jobs:
env:
GHIDRA_VERSION: 11.4.1
GHIDRA_DATE: 20250731
GHIDRA_LIBS: >-
Features/Base/lib/Base.jar
Features/Decompiler/lib/Decompiler.jar
Framework/Docking/lib/Docking.jar
Framework/Generic/lib/Generic.jar
Framework/Project/lib/Project.jar
Framework/SoftwareModeling/lib/SoftwareModeling.jar
Framework/Utility/lib/Utility.jar
Framework/Gui/lib/Gui.jar

steps:
- uses: actions/checkout@v4
Expand All @@ -29,29 +20,15 @@ jobs:
with:
java-version: '21'
distribution: 'temurin'
cache: maven
cache: gradle

- name: Download Ghidra
run: |
wget --no-verbose -O ghidra.zip https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_${{ env.GHIDRA_VERSION }}_build/ghidra_${{ env.GHIDRA_VERSION }}_PUBLIC_${{ env.GHIDRA_DATE }}.zip
7z x -bd ghidra.zip

- name: Copy Ghidra libs
run: |
mkdir -p ./lib
for libfile in ${{ env.GHIDRA_LIBS }}
do echo "Copying ${libfile} to lib/"
cp ghidra_${{ env.GHIDRA_VERSION }}_PUBLIC/Ghidra/${libfile} ./lib/
done

- name: Build with Maven
run: mvn clean package assembly:single

- name: Assemble release directory
run: |
mkdir release
cp target/GhidraMCP-*.zip release/
cp bridge_mcp_ghidra.py release/
- name: Build with Gradle
run: gradle

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ etc/
# Autogenerated files
docs/
dependency-reduced-pom.xml
.gradle/
build/
dist/
50 changes: 50 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Builds a Ghidra Extension for a given Ghidra installation.
//
// An absolute path to the Ghidra installation directory must be supplied either by setting the
// GHIDRA_INSTALL_DIR environment variable or Gradle project property:
//
// > export GHIDRA_INSTALL_DIR=<Absolute path to Ghidra>
// > gradle
//
// or
//
// > gradle -PGHIDRA_INSTALL_DIR=<Absolute path to Ghidra>
//
// Gradle should be invoked from the directory of the project to build. Please see the
// application.gradle.version property in <GHIDRA_INSTALL_DIR>/Ghidra/application.properties
// for the correction version of Gradle to use for the Ghidra installation you specify.
plugins {
id 'java'
id 'eclipse'
id 'idea'
}

def ghidraInstallDir

if (System.env.GHIDRA_INSTALL_DIR) {
ghidraInstallDir = System.env.GHIDRA_INSTALL_DIR
} else if (project.hasProperty("GHIDRA_INSTALL_DIR")) {
ghidraInstallDir = project.getProperty("GHIDRA_INSTALL_DIR")
}

if (ghidraInstallDir) {
apply from: new File(ghidraInstallDir).getCanonicalPath() + "/support/buildExtension.gradle"
} else {
throw new GradleException("GHIDRA_INSTALL_DIR is not defined!")
}

repositories {
mavenCentral()
}

dependencies {
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'org.reflections:reflections:0.10.2'

testImplementation 'junit:junit:4.13.2'
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name=GhidraMCP
description=A plugin that runs an embedded HTTP server to expose program data.
author=LaurieWired
createdOn=2025-07-31
version=11.4.1
ghidraVersion=11.4.1
createdOn=
version=2.3.1
209 changes: 0 additions & 209 deletions pom.xml

This file was deleted.

49 changes: 0 additions & 49 deletions src/assembly/ghidra-extension.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private String disassembleFunction(String addressStr) {
if (instr.getAddress().compareTo(end) > 0) {
break; // Stop if we've gone past the end of the function
}
String comment = listing.getComment(CodeUnit.EOL_COMMENT, instr.getAddress());
String comment = listing.getComment(CommentType.EOL, instr.getAddress());
comment = (comment != null) ? "; " + comment : "";

result.append(String.format("%s: %s %s\n",
Expand Down
Loading
Loading