mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-15 18:12:54 +00:00
153 lines
4.9 KiB
Groovy
153 lines
4.9 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
apply from: "$project.rootDir/automation/gradle/versionCode.gradle"
|
|
|
|
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'
|
|
}
|
|
debug {
|
|
applicationIdSuffix ".debug"
|
|
}
|
|
}
|
|
|
|
flavorDimensions "abi"
|
|
productFlavors {
|
|
// replace the libraries with 64-bit versions when they're ready
|
|
// Processor architectures
|
|
arm {
|
|
dimension "abi"
|
|
ndk {
|
|
abiFilter "armeabi-v7a"
|
|
}
|
|
}
|
|
x86 {
|
|
dimension "abi"
|
|
ndk {
|
|
abiFilter "x86"
|
|
}
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
lintOptions {
|
|
lintConfig file("lint.xml")
|
|
}
|
|
}
|
|
|
|
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 automation/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)
|
|
}
|
|
|
|
androidExtensions {
|
|
experimental = true
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation Deps.kotlin_stdlib
|
|
implementation Deps.androidx_appcompat
|
|
implementation Deps.androidx_constraintlayout
|
|
|
|
implementation Deps.rxAndroid
|
|
implementation Deps.rxKotlin
|
|
implementation Deps.anko_commons
|
|
implementation Deps.anko_sdk
|
|
implementation Deps.anko_appcompat
|
|
implementation Deps.anko_constraintlayout
|
|
|
|
implementation Deps.sentry
|
|
|
|
implementation Deps.mozilla_concept_engine
|
|
implementation Deps.mozilla_concept_storage
|
|
implementation Deps.mozilla_concept_toolbar
|
|
|
|
implementation Deps.mozilla_browser_awesomebar
|
|
implementation Deps.mozilla_feature_downloads
|
|
implementation Deps.mozilla_browser_domains
|
|
implementation Deps.mozilla_browser_engine_gecko_nightly
|
|
implementation Deps.mozilla_browser_session
|
|
implementation Deps.mozilla_browser_storage_sync
|
|
implementation Deps.mozilla_browser_toolbar
|
|
|
|
implementation Deps.mozilla_feature_awesomebar
|
|
implementation Deps.mozilla_feature_downloads
|
|
implementation Deps.mozilla_feature_intent
|
|
implementation Deps.mozilla_feature_session
|
|
implementation Deps.mozilla_feature_toolbar
|
|
implementation Deps.mozilla_feature_tabs
|
|
implementation Deps.mozilla_service_fretboard
|
|
|
|
implementation Deps.mozilla_support_ktx
|
|
|
|
implementation Deps.mozilla_lib_crash
|
|
|
|
testImplementation Deps.junit
|
|
androidTestImplementation Deps.tools_test_runner
|
|
androidTestImplementation Deps.tools_espresso_core
|
|
|
|
armImplementation Deps.geckoview_nightly_arm
|
|
x86Implementation Deps.geckoview_nightly_x86
|
|
implementation Deps.androidx_legacy
|
|
implementation Deps.android_arch_navigation
|
|
}
|
|
|
|
|
|
android.applicationVariants.all { variant ->
|
|
// Reading sentry token from local file (if it exists). In a release task on taskcluster it will be available.
|
|
try {
|
|
def token = new File("${rootDir}/.sentry_token").text.trim()
|
|
buildConfigField 'String', 'SENTRY_TOKEN', '"' + token + '"'
|
|
} catch (FileNotFoundException ignored) {
|
|
buildConfigField 'String', 'SENTRY_TOKEN', 'null'
|
|
}
|
|
|
|
// Activating crash reporting only if command line parameter was provided (in automation)
|
|
if (project.hasProperty("crashReports") && project.property("crashReports") == "true") {
|
|
buildConfigField 'boolean', 'CRASH_REPORTING', 'true'
|
|
} else {
|
|
buildConfigField 'boolean', 'CRASH_REPORTING', 'false'
|
|
}
|
|
}
|