1
0
Fork 0
firefox/mobile/android/android-components/samples/browser/build.gradle
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

177 lines
6.3 KiB
Groovy

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
plugins {
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}
apply plugin: 'com.android.application'
android {
defaultConfig {
applicationId "org.mozilla.samples.browser"
minSdkVersion = config.minSdkVersion
compileSdk = config.compileSdkVersion
targetSdkVersion = config.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArgument "clearPackageData", "true"
testInstrumentationRunnerArgument "listener", "leakcanary.FailTestOnLeakRunListener"
}
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
flavorDimensions += "engine"
productFlavors {
gecko {
dimension "engine"
}
// WebView
system {
dimension "engine"
}
}
variantFilter { variant ->
if (variant.buildType.name == "release") {
// This is a sample app that we are not releasing. Save some time and do not build
// release versions.
setIgnore(true)
}
}
buildFeatures {
viewBinding = true
compose = true
}
namespace = 'org.mozilla.samples.browser'
}
tasks.register("updateBorderifyExtensionVersion", Copy) { task ->
updateExtensionVersion(task, 'src/main/assets/extensions/borderify')
}
tasks.register("updateTestExtensionVersion", Copy) { task ->
updateExtensionVersion(task, 'src/main/assets/extensions/test')
}
dependencies {
implementation platform(libs.androidx.compose.bom)
implementation project(':concept-awesomebar')
implementation project(':concept-fetch')
implementation project(':concept-engine')
implementation project(':concept-tabstray')
implementation project(':concept-toolbar')
implementation project(':concept-storage')
implementation project(':concept-base')
implementation project(':compose-awesomebar')
implementation project(':browser-engine-system')
implementation project(':browser-domains')
implementation project(':browser-icons')
implementation project(':browser-session-storage')
implementation project(':browser-state')
implementation project(':browser-tabstray')
implementation project(':browser-thumbnails')
implementation project(':browser-toolbar')
implementation project(':browser-menu')
implementation project(':browser-storage-sync')
implementation project(':lib-fetch-httpurlconnection')
implementation project(":lib-crash")
implementation project(':lib-dataprotect')
implementation project(":lib-publicsuffixlist")
implementation project(':feature-awesomebar')
implementation project(":feature-autofill")
implementation project(':feature-app-links')
implementation project(':feature-contextmenu')
implementation project(':feature-customtabs')
implementation project(':feature-downloads')
implementation project(':feature-intent')
implementation project(':feature-media')
implementation project(':feature-readerview')
implementation project(':feature-search')
implementation project(':feature-session')
implementation project(':feature-toolbar')
implementation project(':feature-tabs')
implementation project(':feature-prompts')
implementation project(':feature-privatemode')
implementation project(':feature-pwa')
implementation project(':feature-findinpage')
implementation project(':feature-sitepermissions')
implementation project(':feature-webcompat')
implementation project(':feature-webcompat-reporter')
implementation project(':feature-webnotifications')
implementation project(':feature-addons')
implementation project(':ui-autocomplete')
implementation project(':ui-tabcounter')
implementation project(':ui-widgets')
// Add a dependency on glean to simplify the testing workflow
// for engineers that want to test Gecko metrics exfiltrated via the Glean
// SDK. See bug 1592935 for more context.
implementation project(":service-glean")
implementation libs.mozilla.glean
implementation project(':service-location')
implementation project(':service-digitalassetlinks')
implementation project(':service-sync-logins')
implementation project(':support-base')
implementation project(':support-locale')
implementation project(':support-utils')
implementation project(':support-ktx')
implementation project(':support-webextensions')
implementation project(':support-rustlog')
implementation project(':feature-screendetection')
geckoImplementation project(':browser-engine-gecko')
implementation libs.google.material
implementation libs.androidx.appcompat
implementation libs.androidx.compose.ui.tooling
implementation libs.androidx.compose.foundation
implementation libs.androidx.compose.material
implementation libs.androidx.core.ktx
implementation libs.androidx.constraintlayout
implementation libs.androidx.swiperefreshlayout
implementation libs.androidx.localbroadcastmanager
debugImplementation libs.leakcanary
testImplementation libs.androidx.test.core
testImplementation libs.androidx.test.junit
testImplementation libs.testing.robolectric
testImplementation libs.testing.mockito
testImplementation libs.testing.coroutines
androidTestImplementation project(':support-android-test')
androidTestImplementation libs.androidx.test.core
androidTestImplementation libs.androidx.test.monitor
androidTestImplementation libs.androidx.test.runner
androidTestImplementation libs.androidx.test.rules
androidTestImplementation libs.androidx.test.junit
androidTestImplementation libs.androidx.test.uiautomator
androidTestImplementation libs.androidx.espresso.core
androidTestImplementation libs.testing.leakcanary
androidTestImplementation libs.testing.mockwebserver
}
preBuild.dependsOn updateBorderifyExtensionVersion
preBuild.dependsOn updateTestExtensionVersion