You do not need the build flag for this. Here's how you can do it:
- In your library project, specify the resource:
<bool name="type.free">true</bool> - In your application, which should be free:
<bool name="type.free">true</bool> - In your application, which must be paid:
<bool name="type.free">false</bool>
, . , Context.