/** * Returns the packaged sub-project Jars, coming from Android or Java modules. * * @return a non null, but possibly empty set. */ @NonNull public Set<File> getSubProjectPackagedJars() { final DependencyContainer packageDeps = getPackageDependencies(); Set<File> jars = Sets.newLinkedHashSetWithExpectedSize( packageDeps.getAllPackagedDependencies().size()); for (Dependency dependency : packageDeps.getAllPackagedDependencies()) { // only take the sub-project dependencies if (dependency.getProjectPath() != null) { File libJar = dependency.getClasspathFile(); if (libJar.isFile()) { jars.add(libJar); } } } return jars; }
/** * 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; }
packageDeps.getAllDependencies().size()); for (Dependency dependency : packageDeps.getAllPackagedDependencies()) { if (dependency.getProjectPath() != null || dependency.isLocal()) { continue;