Apply Plugin only for release or disable plugin for variants

(quinlanzhong) #1

I am using a android library name . It needs to use a plugin to transform my code in artifact state . The library name is where buildscipt dependencies is classpath ''

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?