When is the time to register a transform in gradle plugin?
I register a transform in afterEvaluate phase, but I can not get the transform task, so when should I register the transform and when will I get the transform’s task?
Because I need to decide whether to register the transform according to the configuration of the Extension, and the configuration of the Extension can be obtained in the afterEvaluate stage, so I have to register the transform in the afterEvaluate stage.
project.afterEvaluate {
def isOpen = project.vtex.isOpen
if (isOpen){
project.android.registerTransform(new ImplInfoTransform())
def transformTask = project.tasks.find { it.name.contains(ImplInfoTransform.NAME)
}
}