Source code

Revision control

Copy as Markdown

Other Tools

/* 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/. */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.dependency.analysis)
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
sourceSets {
test {
resources {
// We want to access the assets from unit tests. With this configuration we can just
// read the files directly and do not need to rely on Robolectric.
srcDir "${projectDir}/src/main/assets/"
}
}
}
namespace = 'mozilla.components.feature.search'
}
dependencies {
implementation project(':components:browser-icons')
implementation project(':components:browser-state')
implementation project(':components:concept-engine')
implementation project(":components:feature-tabs")
implementation project(':components:service-location')
implementation project(':components:support-base')
implementation project(':components:support-ktx')
implementation project(':components:support-locale')
implementation project(':components:support-remotesettings')
implementation project(':components:support-utils')
implementation project(':components:ui-colors')
implementation ComponentsDependencies.mozilla_appservices_search
implementation ComponentsDependencies.mozilla_remote_settings
implementation libs.androidx.activity
implementation libs.androidx.core.ktx
testImplementation project(':components:support-test')
testImplementation project(':components:support-test-fakes')
testImplementation project(':components:support-test-libstate')
testImplementation ComponentsDependencies.mozilla_appservices_full_megazord_libsForTests
testImplementation libs.androidx.test.core
testImplementation libs.androidx.test.junit
testImplementation libs.kotlinx.coroutines.test
testImplementation libs.robolectric
}
tasks.register("updateAdsExtensionVersion", Copy) { task ->
updateExtensionVersion(task, 'src/main/assets/extensions/ads')
}
tasks.register("updateCookiesExtensionVersion", Copy) { task ->
updateExtensionVersion(task, 'src/main/assets/extensions/search')
}
// Make sure DAGP asset-source exploding happens after ExtensionVersion tasks
tasks.matching { it.name.startsWith("explodeAssetSource") }.configureEach { t ->
t.dependsOn(tasks.named("updateAdsExtensionVersion"))
t.dependsOn(tasks.named("updateCookiesExtensionVersion"))
}
preBuild.dependsOn "updateAdsExtensionVersion"
preBuild.dependsOn "updateCookiesExtensionVersion"
apply from: '../../../common-config.gradle'
apply from: '../../../publish.gradle'
ext.configurePublish(config.componentsGroupId, project.name, project.ext.description)