title: Is it possible to define an Android string-array resource in Gradle?
body: <p>In Gradle for Android, I'm trying to generate the equivalent of this string-array resource...</p>
  
  <pre><code>&lt;resources&gt;
      &lt;string-array name="url_array"&gt;
         &lt;item&gt;http://www.url1.com&lt;/item&gt;
         &lt;item&gt;http://www.url2.com&lt;/item&gt;
         &lt;item&gt;http://www.url3.com&lt;/item&gt;
      &lt;/string-array&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>...in my app's build.gradle config file. I don't want to hardcode these values in res/values/arrays.xml, since I want to be able to generate different array contents for different build variants (dev vs. prod). I know there are workarounds, but this would be the cleanest solution if it's possible.</p>
  
  <p>I've tried things like the excerpt below with a resValue type of "string-array" or "array", but I get an error saying resValue() doesn't exist. Of course, a resValue type param of "string" works for single strings, but I need to generate a string array resource.</p>
  
  <pre><code>resValue "string-array", "url_array",
     ["http://www.url1.com",
      "http://www.url2.com",
      "http://www.url3.com"]
  </code></pre>
  
  <p>The Gradle for Android documentation doesn't help. It lists this method...</p>
  
  <p><a href="https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.ProductFlavor.html#com.android.build.gradle.internal.dsl.ProductFlavor:resValue(java.lang.String,%20java.lang.String,%20java.lang.String)" rel="noreferrer">void resValue(String type, String name, String value)</a></p>
  
  <p>...but it doesn't indicate the valid values for the type param. It simply has a link that says "<a href="https://developer.android.com/guide/topics/resources/available-resources.html" rel="noreferrer">See Resource Types</a>" but that just points to the regular Android docs for resource types and doesn't describe how to express them in the Gradle Android DSL.</p>
  
  <p>Does anyone have any guidance? I've looked all over online and haven't found anything.</p>