Update ModuleManifestFile.java

The value associated with "EXCLUDE FROM GHIDRA JAR" module configuration has no effect when building the JAR file, for example, "EXCLUDE FROM GHIDRA JAR: false" will have no effect and the module will still be excluded since the current code checks only if the line starts with "EXCLUDE FROM GHIDRA JAR" but does not examine the assigned value. I updated the code to enable the effect of the true/false values.
This commit is contained in:
Nader Shalabi 2022-01-16 00:39:04 +04:00
parent 82c42e648c
commit 93f3b942bb

View file

@ -95,7 +95,16 @@ public class ModuleManifestFile {
// ignore for now
}
else if (trimmedLine.startsWith(EXCLUDE_FROM_GHIDRA_JAR)) {
excludeFromGhidraJar = true;
String[] tokens = trimmedLine.split(":");
if (tokens.length == 2) {
if (tokens[1].toLowerCase().trim().compareTo("false") == 0)
excludeFromGhidraJar = false;
else
excludeFromGhidraJar = true;
}
else
excludeFromGhidraJar = true; // Default to not be included in build
}
else if (trimmedLine.startsWith(MODULE_FILE_LICENSE)) {
processModuleFileLicense(trimmedLine);