List<File> otherJars = dependency.getAdditionalClasspath(); if (otherJars != null) { for (File otherJar : otherJars) {
/** * Returns the list of packaged jars for this config. If the config tests a library, this * will include the jars of the tested config * * @return a non null, but possibly empty list. */ @NonNull public Set<File> getAllPackagedJars() { final DependencyContainer packageDeps = getPackageDependencies(); Set<File> jars = Sets.newLinkedHashSetWithExpectedSize( packageDeps.getAllDependencies().size()); for (Dependency dependency : packageDeps.getAllPackagedDependencies()) { File jarFile = dependency.getClasspathFile(); if (jarFile.isFile()) { jars.add(jarFile); } List<File> additionalJarFiles = dependency.getAdditionalClasspath(); if (additionalJarFiles != null) { for (File jar : additionalJarFiles) { if (jar.isFile()) { jars.add(jar); } } } } return jars; }
/** * Returns the compile classpath for this config. If the config tests a library, this * will include the classpath of the tested config * * @return a non null, but possibly empty set. */ @NonNull public Set<File> getCompileClasspath() { DependencyContainer compileDep = getCompileDependencies(); Set<File> classpath = Sets.newLinkedHashSetWithExpectedSize( compileDep.getAllDependencies().size()); for (Dependency dependency : compileDep.getAllDependencies()) { classpath.add(dependency.getClasspathFile()); List<File> additionalFiles = dependency.getAdditionalClasspath(); if (additionalFiles != null) { classpath.addAll(additionalFiles); } } return classpath; }
jars.add(jarFile); List<File> additionalJarFiles = dependency.getAdditionalClasspath(); if (additionalJarFiles != null) { for (File jar : additionalJarFiles) {