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/. */
8 url "https://maven.mozilla.org/maven2"
13 classpath "${ApplicationServicesConfig.groupId}:tooling-nimbus-gradle:${ApplicationServicesConfig.version}"
14 classpath "org.mozilla.telemetry:glean-gradle-plugin:${Versions.mozilla_glean}"
19 id "com.jetbrains.python.envs" version "$python_envs_plugin"
22 apply plugin: 'com.android.library'
23 apply plugin: 'kotlin-android'
27 minSdkVersion config.minSdkVersion
28 compileSdk config.compileSdkVersion
29 targetSdkVersion config.targetSdkVersion
30 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
36 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
42 excludes += ['META-INF/proguard/androidx-annotations.pro']
50 namespace 'mozilla.components.browser.engine.gecko'
53 // Set configuration for the Glean parser to extract metrics.yaml
54 // file from AAR dependencies of this project rather than look
55 // for it into the project directory.
56 ext.allowMetricsFromAAR = true
59 implementation project(':concept-engine')
60 implementation project(':concept-fetch')
61 implementation project(':support-ktx')
62 implementation project(':support-utils')
63 implementation(project(':service-nimbus')) {
64 exclude group: 'org.mozilla.telemetry', module: 'glean-native'
66 implementation ComponentsDependencies.kotlin_coroutines
68 if (findProject(":geckoview") != null) {
69 api project(':geckoview')
71 api ComponentsDependencies.mozilla_geckoview
74 implementation ComponentsDependencies.androidx_paging
75 implementation ComponentsDependencies.androidx_data_store_preferences
76 implementation ComponentsDependencies.androidx_lifecycle_livedata
78 testImplementation ComponentsDependencies.androidx_test_core
79 testImplementation ComponentsDependencies.androidx_test_junit
80 testImplementation ComponentsDependencies.testing_robolectric
81 testImplementation ComponentsDependencies.testing_coroutines
82 testImplementation ComponentsDependencies.testing_mockwebserver
83 testImplementation project(':support-test')
84 testImplementation project(':tooling-fetch-tests')
86 // We only compile against Glean. It's up to the app to add those dependencies
87 // if it wants to collect GeckoView telemetry through the Glean SDK.
88 compileOnly project(":service-glean")
89 testImplementation project(":service-glean")
90 testImplementation ComponentsDependencies.androidx_work_testing
92 androidTestImplementation ComponentsDependencies.androidx_test_core
93 androidTestImplementation ComponentsDependencies.androidx_test_runner
94 androidTestImplementation ComponentsDependencies.androidx_test_rules
95 androidTestImplementation project(':tooling-fetch-tests')
98 apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
99 apply from: '../../../android-lint.gradle'
100 apply from: '../../../publish.gradle'
101 apply plugin: "org.mozilla.appservices.nimbus-gradle-plugin"
103 // The path to the Nimbus feature manifest file
104 manifestFile = "geckoview.fml.yaml"
111 // This is an optional value, and updates the plugin to use a copy of application
112 // services. The path should be relative to the root project directory.
113 // *NOTE*: This example will not work for all projects, but should work for Fenix, Focus, and Android Components
114 applicationServicesDir = gradle.hasProperty('localProperties.autoPublish.application-services.dir')
115 ? gradle.getProperty('localProperties.autoPublish.application-services.dir') : null
117 ext.configurePublish(config.componentsGroupId, archivesBaseName, project.ext.description)