Browse Source

Utilize gradle product flavors to produce free and plus versions

master
Anthony Restaino 10 years ago
parent
commit
e9203f20b3
  1. 2
      app/.gitignore
  2. 21
      app/build.gradle
  3. 0
      app/src/LightningFree/assets/hosts.txt
  4. 26808
      app/src/LightningPlus/assets/hosts.txt
  5. 26808
      app/src/main/assets/hosts.txt
  6. 4
      app/src/main/java/acr/browser/lightning/constant/Constants.java

2
app/.gitignore vendored

@ -1,3 +1,3 @@ @@ -1,3 +1,3 @@
/build
app-release.apk
*.apk
manifest-merger-release-report.txt

21
app/build.gradle

@ -5,26 +5,39 @@ android { @@ -5,26 +5,39 @@ android {
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "acr.browser.lightning"
minSdkVersion 14
targetSdkVersion 22
versionCode 78
versionName "4.0.10a"
}
buildTypes {
release {
debug {
minifyEnabled true
shrinkResources true
proguardFiles 'proguard-project.txt'
}
debug {
release {
minifyEnabled true
shrinkResources true
proguardFiles 'proguard-project.txt'
}
}
productFlavors {
LightningPlus {
buildConfigField "boolean", "FULL_VERSION", "true"
applicationId "acr.browser.lightning"
versionCode 78
}
LightningFree {
buildConfigField "boolean", "FULL_VERSION", "false"
applicationId "acr.browser.barebones"
versionCode 81
}
}
lintOptions {
abortOnError false
}

0
app/src/LightningFree/assets/hosts.txt

26808
app/src/LightningPlus/assets/hosts.txt

File diff suppressed because it is too large Load Diff

26808
app/src/main/assets/hosts.txt

File diff suppressed because it is too large Load Diff

4
app/src/main/java/acr/browser/lightning/constant/Constants.java

@ -5,12 +5,14 @@ package acr.browser.lightning.constant; @@ -5,12 +5,14 @@ package acr.browser.lightning.constant;
import android.os.Environment;
import acr.browser.lightning.BuildConfig;
public final class Constants {
private Constants() {
}
public static final boolean FULL_VERSION = true;
public static final boolean FULL_VERSION = BuildConfig.FULL_VERSION;
public static final String DESKTOP_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36";
public static final String MOBILE_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 4.4; en-us; Nexus 4 Build/JOP24G) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30";

Loading…
Cancel
Save