@NonNull public JarDependency createJarDependency() { return new JarDependency( jarFile, compiled, packaged, true /*proguarded*/, resolvedCoordinates, gradlePath); }
/** * 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); }
/** * 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() { Set<File> classpath = Sets.newHashSetWithExpectedSize( mExternalJars.size() + mLocalJars.size() + mFlatLibraries.size()); for (LibraryDependency lib : mFlatLibraries) { classpath.add(lib.getJarFile()); for (File jarFile : lib.getLocalJars()) { classpath.add(jarFile); } } for (JarDependency jar : mExternalJars) { if (jar.isCompiled()) { classpath.add(jar.getJarFile()); } } for (JarDependency jar : mLocalJars) { if (jar.isCompiled()) { classpath.add(jar.getJarFile()); } } return classpath; }
File jarFile = jar.getJarFile(); if (jar.isCompiled() && !jar.isPackaged() && jarFile.exists()) { jars.add(jarFile); File jarFile = jar.getJarFile(); if (jar.isCompiled() && !jar.isPackaged() && jarFile.exists()) { jars.add(jarFile);
if (jarDep.isCompiled()) { boolean customArtifact = jarDep.getResolvedCoordinates() != null && jarDep.getResolvedCoordinates().getClassifier() != null; File jarFile = jarDep.getJarFile(); if (!customArtifact && jarDep.getProjectPath() != null) { projects.add(jarDep.getProjectPath()); } else { javaLibraries.add( new JavaLibraryImpl(jarFile, null, jarDep.getResolvedCoordinates())); if (jarDep.isCompiled()) { javaLibraries.add( new JavaLibraryImpl( jarDep.getJarFile(), null, jarDep.getResolvedCoordinates()));
if (jar.isPackaged()) { MavenCoordinates coordinates = jar.getResolvedCoordinates(); localJars.put(file, new JarDependency( file, true /*compiled*/, localJars.put(file, new JarDependency( file, false /*compiled*/,
@Override public void execute(StyledTextOutput styledTextOutput) { getTextOutput().text("LOCAL: " + jar.getJarFile().getName()); } }, lastChild);
File jarFile = jar.getJarFile(); if (jar.isPackaged() && jarFile.exists()) { jars.add(jarFile); File jarFile = jar.getJarFile(); if (jar.isPackaged() && jarFile.exists()) { jars.add(jarFile);
@Override @NonNull public List<JarDependency> getLocalDependencies() { List<File> jars = getLocalJars(); List<JarDependency> localDependencies = Lists.newArrayListWithCapacity(jars.size()); for (File jar : jars) { localDependencies.add(new JarDependency(jar, true, true, null, null)); } return localDependencies; }