/** * Returns the list of packaged local jars. */ public static List<File> getPackagedLocalJarFileList(DependencyContainer dependencyContainer) { List<JarDependency> jarDependencyList = dependencyContainer.getLocalDependencies(); Set<File> files = Sets.newHashSetWithExpectedSize(jarDependencyList.size()); for (JarDependency jarDependency : jarDependencyList) { if (jarDependency.isPackaged()) { files.add(jarDependency.getJarFile()); } } return Lists.newArrayList(files); }
/** * Sets the dependencies * * @param container a DependencyContainer. * @return the config object */ @NonNull public VariantConfiguration setDependencies(@NonNull DependencyContainer container) { // Output of mTestedConfig will not be initialized until the tasks for the tested config are // created. If library output has never been added to mDirectLibraries, checked the output // of the mTestedConfig to see if the tasks are now created. if (mTestedConfig != null && mTestedConfig.mType == VariantType.LIBRARY && mTestedConfig.mOutput != null && !mDirectLibraries.contains(mTestedConfig.mOutput)) { mDirectLibraries.add(mTestedConfig.mOutput); } mDirectLibraries.addAll(container.getAndroidDependencies()); mExternalJars.addAll(container.getJarDependencies()); mLocalJars.addAll(container.getLocalDependencies()); resolveIndirectLibraryDependencies(mDirectLibraries, mFlatLibraries); return this; }