Gradle's transform API definiert eine Reihe von Bereichen. Es gibt jedoch wenig Dokumentation darüber, was jeder Bereich bedeutet. Weiß jemand?Definitionen für Gradle Transform API-Bereiche
/**
* 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;
}
}
Angesichts der Tatsache, dass der Android N-Quellcode noch nicht veröffentlicht wurde, gibt es nicht viele gute Beispiele zu lesen. Das Beste, was ich bisher gefunden habe, ist realm-java, die ein paar Transformatoren enthält.
Update: habe eine Antwort von adt-dev. Bestätigt meine Beobachtungen. https://groups.google.com/forum/#!topic/adt-dev/IdqxwvWaLb8 –