Conditional compilation: Getting and testing the package name at compile time
<p>There are numerous examples showing how to get the package name in code at runtime.</p>

<p>In my case, I need to test the package name at <b>compile time</b>.<br></p>

<p>Here is my situation: I have two Android projects (the free and the pro) which leverage a library project.
The free version has a "Get the pro version" menu item, which does not exist in the other version.
My menu handling code goes like this:</p>

<pre><code>if ( item.getItemId()==R.id.getProVersion ) {
   //...
}
</code></pre>

<p>Proguard complains that R.id.getProversion does not exist when building the pro package.
So I need to test which project is being built, to exclude this part of the code from being compiled.</p>

<p>Is there a way to know the package name at compile time ?<br>
Are there alterative solutions to this problem ? Either Android-centered or java-centered solutions are fine.</p>
