2018-12-07 20:11:50 +00:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
apply plugin: 'kotlin-android-extensions'
|
2019-01-07 20:23:30 +00:00
|
|
|
apply from: "$project.rootDir/automation/gradle/versionCode.gradle"
|
2018-12-07 20:11:50 +00:00
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion 28
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "org.mozilla.fenix"
|
|
|
|
minSdkVersion 21
|
|
|
|
targetSdkVersion 28
|
|
|
|
versionCode 1
|
|
|
|
versionName "1.0"
|
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
2019-01-07 20:23:30 +00:00
|
|
|
|
|
|
|
flavorDimensions "abi"
|
|
|
|
productFlavors {
|
|
|
|
// replace the libraries with 64-bit versions when they're ready
|
|
|
|
arm { dimension "abi" }
|
|
|
|
x86 { dimension "abi" }
|
|
|
|
}
|
2019-01-07 21:47:47 +00:00
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2019-01-07 20:23:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
android.applicationVariants.all { variant ->
|
|
|
|
def buildType = variant.buildType.name
|
|
|
|
|
|
|
|
if (buildType == "release" || buildType == "nightly") {
|
|
|
|
def versionCode = generatedVersionCode
|
|
|
|
|
|
|
|
// The Google Play Store does not allow multiple APKs for the same app that all have the
|
|
|
|
// same version code. Therefore we need to have different version codes for our ARM and x86
|
|
|
|
// builds.
|
|
|
|
|
|
|
|
// Our generated version code now has a length of 9 (See tools/gradle/versionCode.gradle).
|
|
|
|
// Our x86 builds need a higher version code to avoid installing ARM builds on an x86 device
|
|
|
|
// with ARM compatibility mode.
|
|
|
|
|
|
|
|
if (variant.flavorName.contains("X86")) {
|
|
|
|
versionCode = versionCode + 1
|
|
|
|
}// else variant.flavorName.contains("Arm")) use generated version code
|
|
|
|
|
|
|
|
variant.outputs.all { output ->
|
|
|
|
setVersionCodeOverride(versionCode)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
println("----------------------------------------------")
|
|
|
|
println("Build type: " + buildType)
|
|
|
|
println("Flavor: " + variant.flavorName)
|
|
|
|
println("Version code: " + variant.mergedFlavor.versionCode)
|
2018-12-07 20:11:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
2019-01-07 20:23:30 +00:00
|
|
|
implementation Deps.kotlin_stdlib
|
|
|
|
implementation Deps.androidx_appcompat
|
|
|
|
implementation Deps.androidx_constraintlayout
|
|
|
|
testImplementation Deps.junit
|
|
|
|
androidTestImplementation Deps.tools_test_runner
|
|
|
|
androidTestImplementation Deps.tools_espresso_core
|
|
|
|
|
|
|
|
armImplementation Deps.geckoview_nightly_arm
|
|
|
|
x86Implementation Deps.geckoview_nightly_x86
|
2018-12-07 20:11:50 +00:00
|
|
|
}
|