@NonNull public File getSymbolLocation() { return new File( globalScope.getIntermediatesDir() + "/symbols/" + variantData.getVariantConfiguration().getDirName()); }
@NonNull public File getBuildConfigSourceOutputDir() { return new File( globalScope.getBuildDir() + "/" + FD_GENERATED + "/source/buildConfig/" + variantData.getVariantConfiguration().getDirName()); }
@Override public void execute(MergeResources mergeResourcesTask) { final BaseVariantData<? extends BaseVariantOutputData> variantData = scope.getVariantData(); mergeResourcesTask.setAndroidBuilder(scope.getGlobalScope().getAndroidBuilder()); mergeResourcesTask.setIncrementalFolder( new File( scope.getGlobalScope().getBuildDir() + "/" + AndroidProject.FD_INTERMEDIATES + "/incremental/" + taskNamePrefix + "Resources" + variantData.getVariantConfiguration().getDirName())); mergeResourcesTask.process9Patch = process9Patch; mergeResourcesTask.crunchPng = scope.getGlobalScope().getExtension().getAaptOptions().getCruncherEnabled(); mergeResourcesTask.normalizeResources = scope .getGlobalScope() .getExtension() .getBuildToolsRevision() .compareTo(NORMALIZE_RESOURCES_BUILD_TOOLS) < 0; ConventionMappingHelper.map( mergeResourcesTask, "useNewCruncher", new Callable<Boolean>() { @Override public Boolean call() throws Exception { return scope.getGlobalScope().getExtension().getAaptOptions().getUseNewCruncher(); } }); ConventionMappingHelper.map( mergeResourcesTask, "inputResourceSets", new Callable<List<ResourceSet>>() { @Override public List<ResourceSet> call() throws Exception { List<File> generatedResFolders = Lists.newArrayList( scope.getRenderscriptResOutputDir(), scope.getGeneratedResOutputDir()); if (variantData.getExtraGeneratedResFolders() != null) { generatedResFolders.addAll(variantData.getExtraGeneratedResFolders()); } if (variantData.generateApkDataTask != null && variantData.getVariantConfiguration().getBuildType().isEmbedMicroApp()) { generatedResFolders.add(variantData.generateApkDataTask.getResOutputDir()); } return variantData .getVariantConfiguration() .getResourceSets(generatedResFolders, includeDependencies); } }); ConventionMappingHelper.map( mergeResourcesTask, "outputDir", new Callable<File>() { @Override public File call() throws Exception { return outputLocation != null ? outputLocation : scope.getDefaultMergeResourcesOutputDir(); } }); variantData.mergeResourcesTask = mergeResourcesTask; }
@NonNull public File getRenderscriptLibOutputDir() { return new File( globalScope.getGeneratedDir(), "rs/" + variantData.getVariantConfiguration().getDirName() + "/lib"); }
@NonNull public File getRenderscriptSourceOutputDir() { return new File( globalScope.getGeneratedDir(), "source/rs/" + variantData.getVariantConfiguration().getDirName()); }
@NonNull public File getJavaDependencyCache() { return new File( globalScope.getIntermediatesDir(), "/dependency-cache/" + variantData.getVariantConfiguration().getDirName()); }
@NonNull public File getJavaOutputDir() { return new File( globalScope.getIntermediatesDir(), "/classes/" + variantData.getVariantConfiguration().getDirName()); }
@NonNull public GradleVariantConfiguration getVariantConfiguration() { return variantData.getVariantConfiguration(); }