/** * A synthetic input to allow gradle up-to-date checks to work. * * Since {@code List<ManifestProvider>} can't be used directly, as @Nested doesn't work on lists, * this method gathers and returns the underlying manifest files. */ @SuppressWarnings("unused") @InputFiles public List<File> getManifestInputs() { List<ManifestProvider> providers = getProviders(); if (providers == null || providers.isEmpty()) { return ImmutableList.of(); } return providers.stream() .map(ManifestProvider::getManifest) .collect(Collectors.toList()); }
@Override protected void doFullTaskAction() { getBuilder().mergeManifestsForApplication( getMainManifest(), getManifestOverlays(), getProviders(), getPackageOverride(), getVersionCode(), getVersionName(), getMinSdkVersion(), getTargetSdkVersion(), getMaxSdkVersion(), getManifestOutputFile().getAbsolutePath(), // no aapt friendly merged manifest file necessary for applications. null /* aaptFriendlyManifestOutputFile */, getInstantRunManifestOutputFile().getAbsolutePath(), ManifestMerger2.MergeType.APPLICATION, variantConfiguration.getManifestPlaceholders(), getOptionalFeatures(), getReportFile()); }