tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

build.gradle (3910B)


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