How to add conditional code in Android.bp
<p>AOSP now has new build system, and file <code>Android.bp</code> has replaced <code>Android.mk</code> in many places.</p>

<p>Now I want to list source files conditionally depending on platform.</p>

<p>Say something like this:</p>

<pre><code>if(atom)
{
   src: [
      .......list of files.......
   ],
   exclude_srcs: [
      .......list of files.......
   ]
} else
{
   src: [
      .......list of files.......
   ],
   exclude_srcs: [
      .......list of files.......
   ]
}
</code></pre>

<p>Any suggestions how to achieve this?
Also, how can I achieve logical operations like <code>NOT</code>, <code>OR</code> etc in conditionals?</p>

<p>Thanks in advance.</p>