title: No matching client found for package name (Google Analytics) - multiple productFlavors & buildTypes
body: <p><strong>Context:</strong></p>
  
  <p>I'm trying to set up Google Analytics for my app. (having 4 custom <code>buildTypes</code> and more than a few <code>productFlavors</code>)</p>
  
  <p>It works fine when I select the <code>Build Variant</code> which has the <code>applicationId</code> set to <code>com.my.app.package.name</code> (the package name used when generating the <code>google-services.json</code>). But, my other flavors have different applicationIds.</p>
  
  <p>I followed the <a href="https://developers.google.com/analytics/devguides/collection/android/v4/" rel="noreferrer">offical devguide</a> to set it up.</p>
  
  <p>Error I get when any another build variant is selected in <code>Build Variants Tab</code> (which has a different <code>applicationId</code> (package name) is as follows:</p>
  
  <blockquote>
    <p>Error:Execution failed for task
    ':app:processAllcategoriesDebugfreeGoogleServices'.</p>
    
    <blockquote>
      <p>No matching client found for package name 'com.my.app.package.name.debug'</p>
    </blockquote>
  </blockquote>
  
  <p><strong>Explanation of Error Message:</strong> </p>
  
  <p>In the task name in the error message above <code>Debugfree</code> is my custom <code>buildType</code> and <code>Allcategories</code> is one of my <code>productFlavors</code>.</p>
  
  <p><strong><em>I understand the error and know the package name is different from what i used when generating the json, but that is what I'm trying to figure a way around.</em></strong></p>
  
  <p><strong>Problem:</strong></p>
  
  <p>Now, the <code>google-services.json</code> resides in the <code>app</code> folder and hence I am not being able to separate them out for each product flavor by dropping them in the flavor specific source set folder.</p>
  
  <p><strong>Questions:</strong></p>
  
  <ol>
  <li>My custom <code>byildType</code> for debugging suffixes <code>.debug</code> to the <code>applicationId</code> (package name). Is there a way I can make it work with the <code>google-services.json</code> which has my release <code>applicationId</code> (i.e. without the suffix <code>.debug</code>)</li>
  <li>Is there a way to have multiple product flavors configured in the same <code>google-services.json</code> file without using separate files and tasks to copy the required file to <code>app</code> folder. I know it can be done using <code>task</code> as mentioned in <a href="https://stackoverflow.com/questions/30772201/google-services-json-for-different-productflavors">this post</a>. Is there a simpler way to just have one file or pick right file based on gradle configuration?</li>
  <li>I see the <code>package_name</code> field in <code>google-services.json</code> has the package name <code>com.my.app.package.name</code>. Can I add multiple package names manually to work for all build variants? If yes, how to do that? Could not find any instructions in documentations.</li>
  </ol>