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/. */
5 apply plugin: 'com.android.application'
6 apply plugin: 'kotlin-android'
9 compileSdkVersion config.compileSdkVersion
12 applicationId "org.mozilla.samples.browser"
13 minSdkVersion config.minSdkVersion
14 targetSdkVersion config.targetSdkVersion
18 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
19 testInstrumentationRunnerArgument "clearPackageData", "true"
20 testInstrumentationRunnerArgument "listener", "leakcanary.FailTestOnLeakRunListener"
26 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
30 flavorDimensions "engine"
43 variantFilter { variant ->
44 if (variant.buildType.name == "release") {
45 // This is a sample app that we are not releasing. Save some time and do not build
56 tasks.register("updateBorderifyExtensionVersion", Copy) { task ->
57 updateExtensionVersion(task, 'src/main/assets/extensions/borderify')
60 tasks.register("updateTestExtensionVersion", Copy) { task ->
61 updateExtensionVersion(task, 'src/main/assets/extensions/test')
64 tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach() {
65 kotlinOptions.freeCompilerArgs += [
66 "-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi"
71 implementation project(':concept-awesomebar')
72 implementation project(':concept-fetch')
73 implementation project(':concept-engine')
74 implementation project(':concept-tabstray')
75 implementation project(':concept-toolbar')
76 implementation project(':concept-storage')
77 implementation project(':concept-base')
79 implementation project(':browser-awesomebar')
80 implementation project(':browser-engine-system')
81 implementation project(':browser-domains')
82 implementation project(':browser-icons')
83 implementation project(':browser-session-storage')
84 implementation project(':browser-state')
85 implementation project(':browser-tabstray')
86 implementation project(':browser-thumbnails')
87 implementation project(':browser-toolbar')
88 implementation project(':browser-menu')
89 implementation project(':browser-storage-sync')
91 implementation project(':lib-fetch-httpurlconnection')
92 implementation project(":lib-crash")
93 implementation project(":lib-publicsuffixlist")
95 implementation project(':feature-awesomebar')
96 implementation project(":feature-autofill")
97 implementation project(':feature-app-links')
98 implementation project(':feature-contextmenu')
99 implementation project(':feature-customtabs')
100 implementation project(':feature-downloads')
101 implementation project(':feature-intent')
102 implementation project(':feature-media')
103 implementation project(':feature-readerview')
104 implementation project(':feature-search')
105 implementation project(':feature-session')
106 implementation project(':feature-toolbar')
107 implementation project(':feature-tabs')
108 implementation project(':feature-prompts')
109 implementation project(':feature-privatemode')
110 implementation project(':feature-pwa')
111 implementation project(':feature-findinpage')
112 implementation project(':feature-sitepermissions')
113 implementation project(':feature-webcompat')
114 implementation project(':feature-webcompat-reporter')
115 implementation project(':feature-webnotifications')
116 implementation project(':feature-addons')
118 implementation project(':ui-autocomplete')
119 implementation project(':ui-tabcounter')
121 // Add a dependency on service-glean to simplify the testing workflow
122 // for engineers that want to test Gecko metrics exfiltrated via the Glean
123 // SDK. See bug 1592935 for more context.
124 implementation project(':service-glean')
125 implementation project(':service-location')
126 implementation project(':service-digitalassetlinks')
128 implementation project(':support-utils')
129 implementation project(':support-ktx')
130 implementation project(':support-webextensions')
131 implementation project(':support-rustlog')
133 geckoImplementation project(':browser-engine-gecko')
135 implementation Dependencies.google_material
137 implementation Dependencies.kotlin_stdlib
139 implementation Dependencies.androidx_appcompat
140 implementation Dependencies.androidx_core_ktx
141 implementation Dependencies.androidx_constraintlayout
142 implementation Dependencies.androidx_swiperefreshlayout
143 implementation Dependencies.androidx_localbroadcastmanager
145 debugImplementation Dependencies.leakcanary
147 androidTestImplementation project(':support-android-test')
148 androidTestImplementation Dependencies.androidx_test_core
149 androidTestImplementation Dependencies.androidx_test_runner
150 androidTestImplementation Dependencies.androidx_test_rules
151 androidTestImplementation Dependencies.androidx_test_junit
152 androidTestImplementation Dependencies.androidx_test_uiautomator
153 androidTestImplementation Dependencies.androidx_espresso_core
154 androidTestImplementation Dependencies.testing_leakcanary
155 androidTestImplementation Dependencies.testing_mockwebserver
158 preBuild.dependsOn updateBorderifyExtensionVersion
159 preBuild.dependsOn updateTestExtensionVersion