From b05c409a9fa6f861b097fd3f47e3ff5ba73764ee Mon Sep 17 00:00:00 2001 From: ghidra1 Date: Mon, 25 Nov 2019 17:34:41 -0500 Subject: [PATCH] GT-3328 minor revisions to sleigh options processing per review --- GhidraBuild/BuildFiles/sleighDevBuild.template | 15 +++++++++------ GhidraBuild/BuildFiles/sleighDistBuild.template | 15 +++++++++------ gradle/processorProject.gradle | 9 ++++----- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/GhidraBuild/BuildFiles/sleighDevBuild.template b/GhidraBuild/BuildFiles/sleighDevBuild.template index 993315a389..49635752eb 100644 --- a/GhidraBuild/BuildFiles/sleighDevBuild.template +++ b/GhidraBuild/BuildFiles/sleighDevBuild.template @@ -1,14 +1,17 @@ diff --git a/GhidraBuild/BuildFiles/sleighDistBuild.template b/GhidraBuild/BuildFiles/sleighDistBuild.template index aebf9adf3d..c47a3fedef 100644 --- a/GhidraBuild/BuildFiles/sleighDistBuild.template +++ b/GhidraBuild/BuildFiles/sleighDistBuild.template @@ -1,13 +1,16 @@ diff --git a/gradle/processorProject.gradle b/gradle/processorProject.gradle index c0a0421819..09aa2edfad 100644 --- a/gradle/processorProject.gradle +++ b/gradle/processorProject.gradle @@ -57,7 +57,8 @@ dependencies { *****************************************************************************************/ def checkSleighCompileOptions() { sleighCompileOptions.each { a -> - assert !(a.startsWith("-a") || a.startsWith("-i")) : "Invalid sleighCompileOption: ${a}" + def arg = a.trim() + assert !(arg.startsWith("-a") || arg.startsWith("-i")) : "Invalid sleighCompileOption: ${arg}" } } @@ -215,10 +216,7 @@ saveSleighArgs.inputs.files (taskInputs) * *****************************************************************************************/ def getProjectReposRootPath() { - def rootPath = rootProject.projectDir.absolutePath - int index = rootPath.lastIndexOf(File.separator) - rootPath = rootPath.substring(0, index+1) - return rootPath + return rootProject.projectDir.getParent() + File.separator } /***************************************************************************************** @@ -235,6 +233,7 @@ def getProjectReposRootPath() { * *****************************************************************************************/ def resolveSleighArg(String arg, boolean useDevPath) { + arg = arg.trim() int index = arg.indexOf("%%") if (index < 0) { return arg