Search in sources :

Example 1 with InputFiles

use of org.gradle.api.tasks.InputFiles in project atlas by alibaba.

the class MergeAwoManifests method getLibraryManifests.

/**
     * A synthetic input to allow gradle up-to-date checks to work.
     * <p>
     * Since List<ManifestDependencyImpl> can't be used directly, as @Nested doesn't work on lists,
     * this method gathers and returns the underlying manifest files.
     */
@SuppressWarnings("unused")
@InputFiles
List<File> getLibraryManifests() {
    List<? extends AndroidLibrary> libs = getLibraries();
    if (libs == null || libs.isEmpty()) {
        return Collections.emptyList();
    }
    List<File> files = Lists.newArrayListWithCapacity(libs.size() * 2);
    for (AndroidLibrary mdi : libs) {
        files.add(mdi.getManifest());
    }
    return files;
}
Also used : AndroidLibrary(com.android.builder.model.AndroidLibrary) File(java.io.File) OutputFile(org.gradle.api.tasks.OutputFile) InputFile(org.gradle.api.tasks.InputFile) InputFiles(org.gradle.api.tasks.InputFiles)

Example 2 with InputFiles

use of org.gradle.api.tasks.InputFiles in project atlas by alibaba.

the class MergeAwbManifests method getLibraryManifests.

/**
     * A synthetic input to allow gradle up-to-date checks to work.
     * <p>
     * Since List<ManifestDependencyImpl> can't be used directly, as @Nested doesn't work on lists,
     * this method gathers and returns the underlying manifest files.
     */
@SuppressWarnings("unused")
@InputFiles
List<File> getLibraryManifests() {
    List<? extends AndroidLibrary> libs = getLibraries();
    if (libs == null || libs.isEmpty()) {
        return Collections.emptyList();
    }
    List<File> files = Lists.newArrayListWithCapacity(libs.size() * 2);
    for (AndroidLibrary mdi : libs) {
        files.add(mdi.getManifest());
    }
    return files;
}
Also used : AndroidLibrary(com.android.builder.model.AndroidLibrary) File(java.io.File) OutputFile(org.gradle.api.tasks.OutputFile) InputFile(org.gradle.api.tasks.InputFile) InputFiles(org.gradle.api.tasks.InputFiles)

Aggregations

AndroidLibrary (com.android.builder.model.AndroidLibrary)2 File (java.io.File)2 InputFile (org.gradle.api.tasks.InputFile)2 InputFiles (org.gradle.api.tasks.InputFiles)2 OutputFile (org.gradle.api.tasks.OutputFile)2