private static void findPackageDirs(List<String> packages, ResourceFile dir) {
		boolean added = false;
		ResourceFile[] files = dir.listFiles(f -> f.isDirectory() || f.getName().endsWith(".java"));
		for (ResourceFile file : files) {
			if (!file.getName().matches("internal|private")) {
				if (file.isDirectory()) {
					findPackageDirs(packages, file);
				}
				else if (!added) {
					added = true;
					packages.add(dir.getAbsolutePath());
				}
			}
		}
	}
Assumes that {@link #updateRequirementsFromMetadata()} has been called recently

@return deduped requirements
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/GhidraSourceBundle.java