1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
/* 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/. */
buildscript {
repositories {
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
maven {
url = repository
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
allowInsecureProtocol = true
}
}
}
}
dependencies {
classpath "${ApplicationServicesConfig.groupId}:tooling-nimbus-gradle:${ApplicationServicesConfig.version}"
classpath libs.glean.gradle.plugin
}
}
plugins {
alias(libs.plugins.python.envs.plugin)
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
defaultConfig {
minSdkVersion = config.minSdkVersion
compileSdk = config.compileSdkVersion
targetSdkVersion = config.targetSdkVersion
}
buildTypes {
debug {
// Export experiments proguard rules even in debug since consuming apps may still
// enable proguard/R8
consumerProguardFiles 'proguard-rules-consumer.pro'
}
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
consumerProguardFiles 'proguard-rules-consumer.pro'
}
}
buildFeatures {
buildConfig = true
}
namespace = 'mozilla.components.service.nimbus'
}
dependencies {
// These dependencies are part of this module's public API.
api (ComponentsDependencies.mozilla_appservices_nimbus) {
// Use our own version of the Glean dependency,
// which might be different from the version declared by A-S.
exclude group: 'org.mozilla.telemetry', module: 'glean'
}
implementation libs.androidx.core.ktx
implementation libs.androidx.constraintlayout
implementation libs.androidx.coordinatorlayout
implementation libs.androidx.recyclerview
implementation libs.androidx.work.runtime
implementation libs.kotlin.coroutines
implementation ComponentsDependencies.mozilla_appservices_nimbus
implementation project(':support-base')
implementation project(':support-locale')
implementation project(':support-ktx')
implementation project(':support-utils')
// We only compile against GeckoView and Glean. It's up to the app to add those dependencies if it wants to
// send crash reports to Socorro (GV).
compileOnly libs.mozilla.glean
testImplementation ComponentsDependencies.mozilla_appservices_full_megazord_libsForTests
testImplementation libs.androidx.test.core
testImplementation libs.androidx.test.junit
testImplementation libs.testing.mockwebserver
testImplementation libs.testing.robolectric
testImplementation libs.testing.coroutines
testImplementation libs.mozilla.glean.forUnitTests
testImplementation libs.androidx.work.testing
testImplementation project(':support-test')
testImplementation libs.mozilla.glean
}
apply from: '../../../android-lint.gradle'
apply from: '../../../publish.gradle'
ext.configurePublish(config.componentsGroupId, project.name, project.ext.description)
apply plugin: "org.mozilla.appservices.nimbus-gradle-plugin"
nimbus {
// The path to the Nimbus feature manifest file
manifestFile = "messaging.fml.yaml"
// Map from the variant name to the channel as experimenter and nimbus understand it.
// If nimbus's channels were accurately set up well for this project, then this
// shouldn't be needed.
channels = [
debug: "debug",
release: "release",
]
// This is an optional value, and updates the plugin to use a copy of application
// services. The path should be relative to the root project directory.
// *NOTE*: This example will not work for all projects, but should work for Fenix, Focus, and Android Components
applicationServicesDir = gradle.hasProperty('localProperties.autoPublish.application-services.dir')
? gradle.getProperty('localProperties.autoPublish.application-services.dir') : null
}
ext {
gleanNamespace = "mozilla.telemetry.glean"
gleanPythonEnvDir = gradle.mozconfig.substs.GRADLE_GLEAN_PARSER_VENV
}
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|