|
| 1 | +/* This Source Code Form is subject to the terms of the Mozilla Public |
| 2 | + * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 | + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 4 | + |
| 5 | +apply plugin: 'com.android.application' |
| 6 | +apply plugin: 'kotlin-android' |
| 7 | +apply plugin: 'kotlin-android-extensions' |
| 8 | + |
| 9 | +android { |
| 10 | + compileSdkVersion Config.compileSdkVersion |
| 11 | + |
| 12 | + defaultConfig { |
| 13 | + applicationId "org.mozilla.reference.browser" |
| 14 | + minSdkVersion Config.minSdkVersion |
| 15 | + targetSdkVersion Config.targetSdkVersion |
| 16 | + versionCode Config.versionCode |
| 17 | + versionName Config.versionName |
| 18 | + |
| 19 | + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| 20 | + } |
| 21 | + |
| 22 | + buildTypes { |
| 23 | + release { |
| 24 | + minifyEnabled false |
| 25 | + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 26 | + } |
| 27 | + } |
| 28 | + |
| 29 | + flavorDimensions "engine", "abi" |
| 30 | + |
| 31 | + productFlavors { |
| 32 | + // GeckoView release channels (GV release is not on maven.mozilla.org yet) |
| 33 | + geckoNightly { dimension "engine" } |
| 34 | + geckoBeta { dimension "engine" } |
| 35 | + |
| 36 | + // WebViewgeck |
| 37 | + system { dimension "engine" } |
| 38 | + |
| 39 | + // Processor architectures |
| 40 | + arm { dimension "abi" } |
| 41 | + x86 { dimension "abi" } |
| 42 | + universal { dimension "abi" } |
| 43 | + } |
| 44 | + |
| 45 | + variantFilter { variant -> |
| 46 | + def flavors = variant.flavors*.name.toString().toLowerCase() |
| 47 | + if (flavors.contains("system") && !flavors.contains("universal")) { |
| 48 | + setIgnore(true) |
| 49 | + } |
| 50 | + |
| 51 | + if (flavors.contains("gecko") && flavors.contains("universal")) { |
| 52 | + setIgnore(true) |
| 53 | + } |
| 54 | + } |
| 55 | +} |
| 56 | + |
| 57 | +configurations { |
| 58 | + systemUniversalImplementation {} |
| 59 | + |
| 60 | + geckoNightlyArmImplementation {} |
| 61 | + geckoNightlyX86Implementation {} |
| 62 | + |
| 63 | + geckoBetaArmImplementation {} |
| 64 | + geckoBetaX86Implementation {} |
| 65 | +} |
| 66 | + |
| 67 | +dependencies { |
| 68 | + implementation Deps.mozilla_concept_engine |
| 69 | + implementation Deps.mozilla_concept_tabstray |
| 70 | + implementation Deps.mozilla_concept_toolbar |
| 71 | + |
| 72 | + implementation Deps.mozilla_browser_search |
| 73 | + implementation Deps.mozilla_browser_session |
| 74 | + implementation Deps.mozilla_browser_tabstray |
| 75 | + implementation Deps.mozilla_browser_toolbar |
| 76 | + implementation Deps.mozilla_browser_menu |
| 77 | + |
| 78 | + implementation Deps.mozilla_feature_intent |
| 79 | + implementation Deps.mozilla_feature_search |
| 80 | + implementation Deps.mozilla_feature_session |
| 81 | + implementation Deps.mozilla_feature_toolbar |
| 82 | + implementation Deps.mozilla_feature_tabs |
| 83 | + |
| 84 | + implementation Deps.mozilla_ui_autocomplete |
| 85 | + |
| 86 | + implementation Deps.mozilla_support_utils |
| 87 | + |
| 88 | + systemUniversalImplementation Deps.mozilla_browser_engine_system |
| 89 | + |
| 90 | + geckoNightlyImplementation Deps.mozilla_browser_engine_gecko_nightly |
| 91 | + geckoNightlyArmImplementation Gecko.geckoview_nightly_arm |
| 92 | + geckoNightlyX86Implementation Gecko.geckoview_nightly_x86 |
| 93 | + |
| 94 | + geckoBetaImplementation Deps.mozilla_browser_engine_gecko_beta |
| 95 | + geckoBetaArmImplementation Gecko.geckoview_beta_arm |
| 96 | + geckoBetaX86Implementation Gecko.geckoview_beta_x86 |
| 97 | + |
| 98 | + implementation Deps.kotlin_stdlib |
| 99 | + implementation Deps.kotlin_coroutines |
| 100 | + |
| 101 | + implementation Deps.support_appcompat |
| 102 | + implementation Deps.support_constraintlayout |
| 103 | +} |
0 commit comments