protected void waitForAllTasks() { try { mExecutor.waitForTasksWithQuickFail(true); } catch (InterruptedException | LoggedErrorException e) { throw new RuntimeException(e); } }
public void search(@NonNull SourceFileProcessor processor) throws ProcessException, LoggedErrorException, InterruptedException, IOException { for (File file : mSourceFolders) { // pass both the root folder (the source folder) and the file/folder to process, // in this case the source folder as well. processFile(file, file, processor); } if (mExecutor != null) { mExecutor.waitForTasksWithQuickFail(true /*cancelRemaining*/); } }
public void search(@NonNull SourceFileProcessor processor) throws ProcessException, LoggedErrorException, InterruptedException, IOException { for (File file : mSourceFolders) { // pass both the root folder (the source folder) and the file/folder to process, // in this case the source folder as well. processFile(file, file, processor); } if (mExecutor != null) { mExecutor.waitForTasksWithQuickFail(true /*cancelRemaining*/); } }
/** * Gradle's entry-point into this task. Determines whether or not it's possible to do this task * incrementally and calls either doIncrementalTaskAction() if an incremental build is possible, * and doFullTaskAction() if not. */ @TaskAction void taskAction(IncrementalTaskInputs inputs) throws Exception { initDesugarJar(getProject().getExtensions().findByType(JFXMobileExtension.class).getAndroidExtension().getBuildCache()); if (Files.notExists(inputDir.toPath())) { PathUtils.deleteIfExists(outputDir.toPath()); } else { processSingle(inputDir.toPath(), outputDir.toPath(), Collections.emptySet()); } waitableExecutor.waitForTasksWithQuickFail(true); processNonCachedOnes(getClasspath()); waitableExecutor.waitForTasksWithQuickFail(true); }
mExecutor.waitForTasksWithQuickFail(true /*cancelRemaining*/);
mExecutor.waitForTasksWithQuickFail(true /*cancelRemaining*/);
public static void extractAarInParallel( @NonNull Project project, @NonNull GradleVariantConfiguration config, @NonNull Optional<FileCache> buildCache) throws LoggedErrorException, InterruptedException, IOException { WaitableExecutor<Void> executor = WaitableExecutor.useGlobalSharedThreadPool(); Set<AndroidDependency> dependencies = Sets.newHashSet(config.getFlatCompileAndroidLibraries()); dependencies.addAll(config.getFlatPackageAndroidLibraries()); for (AndroidDependency androidDependency :dependencies) { if (androidDependency.getProjectPath() != null) { // Don't need to explode sub-module library. continue; } File input = androidDependency.getArtifactFile(); File output = androidDependency.getExtractedFolder(); boolean useBuildCache = PrepareLibraryTask.shouldUseBuildCache(buildCache.isPresent(), androidDependency.getCoordinates()); PrepareLibraryTask.prepareLibrary( input, output, buildCache.isPresent() ? buildCache.get() : null, createAction(project, executor, input), project.getLogger(), useBuildCache); } executor.waitForTasksWithQuickFail(false); }
executor.waitForTasksWithQuickFail(true /* cancelRemaining */); } catch (LoggedErrorException e) { logger.error("Exception while generating split APKs " + e.getMessage());
executor.waitForTasksWithQuickFail(false); logger.verbose("Done with all dexing");
executor.waitForTasksWithQuickFail(true /*cancelRemaining*/); } catch (Throwable t) { FileUtils.delete(incrementalData);