我何时需要在Gradle Transformation API中使用SecondaryFile

时间:2018-11-05 11:39:50

标签: android gradle

/**
 * Returns a list of additional file(s) that this Transform needs to run.
 *
 * <p>Changes to files returned in this list will trigger a new execution of the Transform
 * even if the qualified-content inputs haven't been touched.
 *
 * <p>Each secondary input has the ability to be declared as necessitating a non incremental
 * execution in case of change. This Transform can therefore declare which secondary file
 * changes it supports in incremental mode.
 *
 * <p>The default implementation returns an empty collection.
 */
@NonNull
public Collection<SecondaryFile> getSecondaryFiles() {
    return ImmutableList.of();
}

transform interface中,我们可以找到一个名为getSecondaryFiles()的方法,它与通常的输入和RefernceInput有什么区别。看来通常的输入和referenceInput可以做任何事情。

0 个答案:

没有答案