public class TraceTransform
extends com.android.build.api.transform.Transform
Transform that executes the required code modifications for the Trace SDK during the
build. It should be applied if there is an Android Application already present in the given
Android project. This is required for the automatic initialisation of the Trace SDK.
The scope of this Transform is currently only the given Project and it's subprojects. The
ClassPool is initialised based on that. If the scope of the Transform increases, the
ClassPool should append the corresponding class paths.
The input type for this Transform is currently only classes, as it does not need resources to be modified.
If the Transform does not modify a given class, it should copy it, otherwise that would mean it should be omitted from the final output.
The Transform uses Javassist for the modifications.
| Constructor and Description |
|---|
TraceTransform(com.android.build.gradle.BaseExtension baseExtension,
org.gradle.api.Project project)
Constructor for class.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<com.android.build.api.transform.QualifiedContent.ContentType> |
getInputTypes() |
java.lang.String |
getName() |
java.util.Set<? super com.android.build.api.transform.QualifiedContent.Scope> |
getScopes() |
boolean |
isIncremental() |
void |
transform(com.android.build.api.transform.TransformInvocation transformInvocation) |
public TraceTransform(@NonNull
com.android.build.gradle.BaseExtension baseExtension,
@NonNull
org.gradle.api.Project project)
baseExtension - the BaseExtension.project - the given Project.@NonNull public java.lang.String getName()
getName in class com.android.build.api.transform.Transform@NonNull public java.util.Set<com.android.build.api.transform.QualifiedContent.ContentType> getInputTypes()
getInputTypes in class com.android.build.api.transform.Transform@NonNull public java.util.Set<? super com.android.build.api.transform.QualifiedContent.Scope> getScopes()
getScopes in class com.android.build.api.transform.Transformpublic boolean isIncremental()
isIncremental in class com.android.build.api.transform.Transformpublic void transform(@NonNull
com.android.build.api.transform.TransformInvocation transformInvocation)
throws com.android.build.api.transform.TransformException,
java.lang.InterruptedException,
java.io.IOException
transform in class com.android.build.api.transform.Transformcom.android.build.api.transform.TransformExceptionjava.lang.InterruptedExceptionjava.io.IOException