I could see in the android document that Transform classes are deprecated but I could not see the new API which we should use instead of Transform classes.
Any ideas?
I found this news about it: https://developer.android.com/studio/releases/gradle-plugin-api-updates#transform-removed
It seems like its replacement isn't a single new class, but rather a combination of tools available in the new "androidComponents", according to what they said there... Though I'm still not sure what exactly within androidComponents can achieve the same results.
EDIT:
The same link I posted above has alternatives to the Transform API right below the removal notice. They have alternatives depending on the use case, one for when you need to instrument classes using plain ASM, another for when you want to add new classes on top of the project's ones, and another one to transform the whole project classes, similarly to the deprecated Transform API, though they recommend using it with caution due to its possible performance penalties to the compilation process.