Kts flavored classpath

Is it possible to apply classpath in android to flavor?
For example, I have 2 flavors: goolgePlay and appGallery. I want to apply classpath("com.google.gms:google-services:4.3.5") in the first flavor only. How can I do that?