25

With reference to this answer. Is it possible to create a copy constructor for productFlavors and sourceSets using initWith just like the one in the linked answer. That one worked great for buildTypes.

For buildTypes it was done this way:

debugfree.initWith(buildTypes.debug)

Is this possible for productFlavors and sourceSets as well?

Community
  • 1
  • 1
Viral Patel
  • 32,418
  • 18
  • 82
  • 110
  • 2
    awesome question, this is what I've been looking for. Looks like `productFlavors` have this trick to *combine* the flavor instead: https://stackoverflow.com/a/28341852/3763032 – mochadwi Dec 07 '19 at 04:42
  • Looks like it has been added in 2021, but somehow I can't make it work. See: https://issuetracker.google.com/issues/165642956 – YTerle Sep 06 '22 at 13:06

0 Answers0