Apply Plugin only for release or disable plugin for variants

I am using a android library name com.growingio.android:vds-android-agent:1.1.1@aar . It needs to use a plugin to transform my code in artifact state . The library name is com.growingio.android where buildscipt dependencies is classpath 'com.growingio.android:vds-gradle-plugin:1.1.1'

But It took really long time to transform my code after every installDebug, while I only want to use this plugin in release variant.

I have use variants to split my code to debug and release variant. Only in release variant, my project use releaseImplementation to include their aar. My debug variant didn’t import or use their code in any ways to speed up my build in installDebug. But their plugin just scan and try to transform my code no matter what.

Please know that in my profile report for installDebug, their plugin’s transform task is most time-consuming.

:slight_smile: Can someone help me out here?