build.gradle (2956B)
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 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile 6 7 apply plugin: 'com.android.library' 8 apply plugin: 'kotlin-android' 9 10 android { 11 androidResources { 12 ignoreAssetsPattern '!<dir>extensions:!search_telemetry_v2.json:!amazon*:!azerdict*:!baidu*:!bing*:!ceneje*:!coccoc*:!daum*:!ebay*:!ecosia*:!faclair*:!google*:!gulesider*:!leo*:!mapy*:!mercadolibre*:!odpiralni*:!pazaruvaj*:!prisjakt*:!qwant*:!rakuten*:!salidzinilv*:!seznam*:!vatera*:!wikipedia-*:!wiktionary*:!yahoo*:!yandex*' 13 } 14 15 sourceSets { 16 test { 17 resources { 18 // We want to access the assets from unit tests. With this configuration we can just 19 // read the files directly and do not need to rely on Robolectric. 20 srcDir "${projectDir}/src/main/assets/" 21 } 22 } 23 } 24 25 namespace = 'mozilla.components.feature.search' 26 } 27 28 dependencies { 29 implementation project(':components:browser-icons') 30 implementation project(':components:browser-state') 31 implementation project(':components:concept-engine') 32 implementation project(":components:feature-tabs") 33 implementation project(':components:service-location') 34 implementation project(':components:support-base') 35 implementation project(':components:support-ktx') 36 implementation project(':components:support-locale') 37 implementation project(':components:support-remotesettings') 38 implementation project(':components:support-utils') 39 implementation project(':components:ui-colors') 40 41 implementation ComponentsDependencies.mozilla_appservices_search 42 implementation ComponentsDependencies.mozilla_remote_settings 43 implementation libs.androidx.activity 44 implementation libs.androidx.core.ktx 45 46 testImplementation project(':components:support-test') 47 testImplementation project(':components:support-test-fakes') 48 testImplementation project(':components:support-test-libstate') 49 50 testImplementation ComponentsDependencies.mozilla_appservices_full_megazord_libsForTests 51 testImplementation libs.androidx.test.core 52 testImplementation libs.androidx.test.junit 53 testImplementation libs.kotlinx.coroutines.test 54 testImplementation libs.robolectric 55 } 56 57 tasks.register("updateAdsExtensionVersion", Copy) { task -> 58 updateExtensionVersion(task, 'src/main/assets/extensions/ads') 59 } 60 61 tasks.register("updateCookiesExtensionVersion", Copy) { task -> 62 updateExtensionVersion(task, 'src/main/assets/extensions/search') 63 } 64 65 preBuild.dependsOn "updateAdsExtensionVersion" 66 preBuild.dependsOn "updateCookiesExtensionVersion" 67 68 apply from: '../../../common-config.gradle' 69 apply from: '../../../publish.gradle' 70 ext.configurePublish(config.componentsGroupId, project.name, project.ext.description)