@Override public List<File> call() throws Exception { return androidBuilder.getBootClasspath(); } });
scope.getGlobalScope() .getAndroidBuilder() .getBootClasspath(false)));
/** * Helper method to get the boot classpath to be used during compilation. */ @NonNull public List<String> getBootClasspathAsStrings() { List<File> classpath = getBootClasspath(); // convert to Strings. List<String> results = Lists.newArrayListWithCapacity(classpath.size()); for (File f : classpath) { results.add(f.getAbsolutePath()); } return results; }
/** * Helper method to get the boot classpath to be used during compilation. * * @param includeOptionalLibraries if true, optional libraries are included even if not * required by the project setup. */ @NonNull public List<String> getBootClasspathAsStrings(boolean includeOptionalLibraries) { List<File> classpath = getBootClasspath(includeOptionalLibraries); // convert to Strings. List<String> results = Lists.newArrayListWithCapacity(classpath.size()); for (File f : classpath) { results.add(f.getAbsolutePath()); } return results; }
public NewShrinkerTransform(@NonNull VariantScope scope) { super(scope); this.platformJars = ImmutableSet.copyOf( scope.getGlobalScope().getAndroidBuilder().getBootClasspath(true)); this.incrementalDir = scope.getIncrementalDir(scope.getTaskName(NAME)); this.dontwarnLines = Lists.newArrayList(); this.keepLines = Lists.newArrayList(); }
@Override public ConfigurableFileCollection call() throws Exception { Iterable<File> filteredBootClasspath = Iterables.filter( androidBuilder.getBootClasspath(), new Predicate<File>() { @Override public boolean apply(@Nullable File file) { return file != null && !SdkConstants.FN_FRAMEWORK_LIBRARY .equals(file.getName()); } }); return project.files( testCompileTask.getClasspath(), testCompileTask.getOutputs().getFiles(), variantData.processJavaResourcesTask.getOutputs(), testedVariantData.processJavaResourcesTask.getOutputs(), filteredBootClasspath, // Mockable JAR is last, to make sure you can shadow the classes // withdependencies. createMockableJar.getOutputFile()); } });
.getBootClasspath(false) .stream() .filter(PLATFORM_JAR.negate())
for (File runtimeJar : globalScope.getAndroidBuilder().getBootClasspath(true)) { libraryJar(runtimeJar);
.bootClasspath(() -> androidBuilder.getBootClasspath(true)) .buildToolInfo(androidBuilder::getBuildToolInfo) .errorReporter(androidBuilder.getErrorReporter())