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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
defaultConfig {
minSdkVersion = config.minSdkVersion
compileSdk = config.compileSdkVersion
targetSdkVersion = config.targetSdkVersion
}
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
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:feature-tabs")
implementation project(':components:browser-state')
implementation project(':components:concept-engine')
implementation project(':components:service-location')
implementation project(':components:support-utils')
implementation project(':components:support-ktx')
implementation project(':components:ui-colors')
implementation project(':components:support-base')
implementation project(':components:support-remotesettings')
implementation libs.androidx.activity
implementation libs.androidx.core.ktx
implementation ComponentsDependencies.mozilla_remote_settings
implementation ComponentsDependencies.mozilla_appservices_search
implementation project(':components:browser-icons')
testImplementation project(':components:support-test')
testImplementation project(':components:support-test-fakes')
testImplementation project(':components:support-test-libstate')
testImplementation libs.androidx.test.core
testImplementation libs.androidx.test.junit
testImplementation libs.testing.robolectric
testImplementation libs.testing.coroutines
testImplementation ComponentsDependencies.mozilla_appservices_full_megazord_libsForTests
}
tasks.register("updateAdsExtensionVersion", Copy) { task ->
updateExtensionVersion(task, 'src/main/assets/extensions/ads')
}
tasks.register("updateCookiesExtensionVersion", Copy) { task ->
updateExtensionVersion(task, 'src/main/assets/extensions/search')
}
preBuild.dependsOn "updateAdsExtensionVersion"
preBuild.dependsOn "updateCookiesExtensionVersion"
apply from: '../../../android-lint.gradle'
apply from: '../../../publish.gradle'
ext.configurePublish(config.componentsGroupId, project.name, project.ext.description)