title: How can I include a library project in only the Premium build of my app and not the Free build?
body: <p>I have an App which uses the same code base for the Paid and Free versions..</p>
  
  <p>The cut-down <code>build.gradle</code> below gives an idea of the structure </p>
  
  <pre><code>android {
  ....
  defaultConfig {
      applicationId "com.myco.myapp"
      ....
  }
  
  buildTypes {
  ....
      release {
      ....
      }
  }
  
  productFlavors {
      free {
          applicationIdSuffix ".free"
          buildConfigField "boolean", "PREMIUM", "false"
          buildConfigField "boolean", "FREE", "true"
      }
      premium {
          applicationIdSuffix ".premium"
          buildConfigField "boolean", "PREMIUM", "true"
          buildConfigField "boolean", "FREE", "false"
      }
  }
  
  dependencies {
      ....
      compile project(path: ':LVL')
  }
  </code></pre>
  
  <p>I am calling the LVL licencing in <code>onCreate</code> as follows :-</p>
  
  <pre><code>        if (BuildConfig.PREMIUM) {
          String deviceId = Settings.Secure.ANDROID_ID;
          Log.i(TAG, "Device Id: " + deviceId);
          mHandler = new Handler();
          mLicenseCheckerCallback = new MyLicenseCheckerCallback();
          // Construct the LicenseChecker with a Policy.
          mChecker = new LicenseChecker(
                  getApplicationContext(), new ServerManagedPolicy(this,
                  new AESObfuscator(SALT, getPackageName(), deviceId)),
                  BASE64_PUBLIC_KEY  // Your public licensing key.
          );
          doCheck();
      }
  </code></pre>
  
  <p>The LVL library isn't called or required in the 'free' version of <code>myapp</code>. My question is :- how should I structure my project / <code>build.gradle</code> so that the LVL library isn't included in the APK of the Free version (but is included in the Premium version? </p>