title: How to dynamically change application Id in Kotlin DSL
body: <p>Here my code snippet</p>
  <pre><code>val applicationId = when {
      this.name.contains(&quot;test&quot;) -&gt; this.mergedFlavor.applicationId + &quot;.test&quot;
      this.name.contains(&quot;paidDebug&quot;) -&gt; this.mergedFlavor.applicationId + &quot;.dbg&quot;
      this.name.contains(&quot;freeDebud&quot;) -&gt; this.mergedFlavor.applicationId + &quot;.dbg&quot;
      this.name.contains(&quot;paidRelease&quot;) -&gt; this.mergedFlavor.applicationId+ &quot;.release&quot;
      this.name.contains(&quot;freeRelease&quot;) -&gt; this.mergedFlavor.applicationId+ &quot;.release&quot;
      else -&gt; this.mergedFlavor.applicationId + &quot;.development&quot;
  }
  println(applicationId)
  defaultConfig.applicationId = applicationId
  println(this.applicationId)
  </code></pre>
  <p>But changing it to defaultConfig is not changing the applicationId.</p>