mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-10 06:02:09 +00:00
GP-0: Skeleton's build.grade was interfering with building natives in a
release
This commit is contained in:
parent
49592e40c9
commit
27c162ee8f
@ -268,7 +268,11 @@ public class VSCodeProjectScript extends GhidraScript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fix Ghidra installation directory path in build.gradle
|
// Fix Ghidra installation directory path in build.gradle
|
||||||
|
File buildTemplateGradleFile = new File(projectDir, "buildTemplate.gradle");
|
||||||
File buildGradleFile = new File(projectDir, "build.gradle");
|
File buildGradleFile = new File(projectDir, "build.gradle");
|
||||||
|
if (!buildTemplateGradleFile.renameTo(buildGradleFile)) {
|
||||||
|
throw new IOException("Failed to rename: " + buildTemplateGradleFile);
|
||||||
|
}
|
||||||
String fileData = FileUtils.readFileToString(buildGradleFile, StandardCharsets.UTF_8);
|
String fileData = FileUtils.readFileToString(buildGradleFile, StandardCharsets.UTF_8);
|
||||||
fileData =
|
fileData =
|
||||||
fileData.replaceAll("<REPLACE>", FilenameUtils.separatorsToUnix(installDir.getPath()));
|
fileData.replaceAll("<REPLACE>", FilenameUtils.separatorsToUnix(installDir.getPath()));
|
||||||
|
@ -177,6 +177,11 @@ public class GhidraModuleUtils {
|
|||||||
return excludeRegexes.stream().map(r -> Pattern.compile(r)).noneMatch(
|
return excludeRegexes.stream().map(r -> Pattern.compile(r)).noneMatch(
|
||||||
p -> p.matcher(f.getName()).matches());
|
p -> p.matcher(f.getName()).matches());
|
||||||
}, null);
|
}, null);
|
||||||
|
File buildTemplateGradleFile = new File(projectDir, "buildTemplate.gradle");
|
||||||
|
File buildGradleFile = new File(projectDir, "build.gradle");
|
||||||
|
if (!buildTemplateGradleFile.renameTo(buildGradleFile)) {
|
||||||
|
throw new IOException("Failed to rename: " + buildTemplateGradleFile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (CancelledException | IOException e) {
|
catch (CancelledException | IOException e) {
|
||||||
throw new IOException("Failed to copy skeleton directory: " + projectDir);
|
throw new IOException("Failed to copy skeleton directory: " + projectDir);
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@ -36,7 +36,6 @@ rootProject.assembleDistribution {
|
|||||||
exclude '.classpath'
|
exclude '.classpath'
|
||||||
exclude '.project'
|
exclude '.project'
|
||||||
exclude 'build.gradle'
|
exclude 'build.gradle'
|
||||||
rename "buildTemplate.gradle", "build.gradle"
|
|
||||||
rename "gitignore", ".gitignore"
|
rename "gitignore", ".gitignore"
|
||||||
into "Extensions/Ghidra/Skeleton"
|
into "Extensions/Ghidra/Skeleton"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user