126 lines
4.4 KiB
Groovy
126 lines
4.4 KiB
Groovy
/* 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"
|