mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-08-08 07:40:39 -09:00
Improving how we discover external dependencies in gradle.
This commit is contained in:
22
build.gradle
22
build.gradle
@@ -296,22 +296,16 @@ List<String> getExternalDependencies(Project project) {
|
|||||||
|
|
||||||
// for each dependency in the compile configuration
|
// for each dependency in the compile configuration
|
||||||
Configuration runtimeConfig = project.configurations.runtime
|
Configuration runtimeConfig = project.configurations.runtime
|
||||||
runtimeConfig.allDependencies.each { dep ->
|
|
||||||
|
|
||||||
// if the dependency is an external jar
|
runtimeConfig.resolvedConfiguration.getFiles { dep ->
|
||||||
if (dep.class.toString().contains("DefaultExternalModuleDependency")) {
|
dep.class.toString().contains("DefaultExternalModuleDependency")
|
||||||
|
}.each { f ->
|
||||||
// loop back through all the dependency files, looking for one that contains the dependency name.
|
// if we found the path, then add it to the list
|
||||||
String depPath = runtimeConfig.find {
|
if (!f.getAbsolutePath().contains("libsForBuild")) {
|
||||||
it.name.contains(dep.name)
|
list.add(f)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we found the path, then add it to the list
|
|
||||||
if (depPath && !depPath.contains("libsForBuild")) {
|
|
||||||
list.add(depPath)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return list
|
return list
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user