1
Gradle的transform API定義了多個示波器。但是,幾乎沒有關於每個範圍的含義的文檔。有人知道嗎?gradle Transform API示波器的定義
/**
* The scope of the content.
*
* <p/>
* This indicates what the content represents, so that Transforms can apply to only part(s)
* of the classes or resources that the build manipulates.
*/
enum Scope {
/** Only the project content */
PROJECT(0x01),
/** Only the project's local dependencies (local jars) */
PROJECT_LOCAL_DEPS(0x02),
/** Only the sub-projects. */
SUB_PROJECTS(0x04),
/** Only the sub-projects's local dependencies (local jars). */
SUB_PROJECTS_LOCAL_DEPS(0x08),
/** Only the external libraries */
EXTERNAL_LIBRARIES(0x10),
/** Code that is being tested by the current variant, including dependencies */
TESTED_CODE(0x20),
/** Local or remote dependencies that are provided-only */
PROVIDED_ONLY(0x40);
private final int value;
Scope(int value) {
this.value = value;
}
public int getValue() {
return value;
}
}
鑑於Android N源代碼尚未發佈,因此沒有太多好的示例可供閱讀。迄今爲止我發現的最好的是realm-java其中包含幾個變壓器。
更新:得到了adt-dev的迴應。證實了我的觀察。 https://groups.google.com/forum/#!topic/adt-dev/IdqxwvWaLb8 –