2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-15 18:12:54 +00:00

1592947: Use the Glean Gradle plugin

This commit is contained in:
Michael Droettboom 2020-02-27 14:35:49 -05:00 committed by Jeff Boek
parent 5a6fc02976
commit bb2c009c16
2 changed files with 22 additions and 15 deletions

View File

@ -1,3 +1,19 @@
// Allow installing Gradle plugins from the Mozilla Maven repositories
buildscript {
repositories {
maven {
url "https://snapshots.maven.mozilla.org/maven2"
}
maven {
url "https://maven.mozilla.org/maven2"
}
dependencies {
classpath "org.mozilla.components:tooling-glean-gradle:${Versions.mozilla_android_components}"
}
}
}
plugins { plugins {
id "com.jetbrains.python.envs" version "0.0.26" id "com.jetbrains.python.envs" version "0.0.26"
} }
@ -378,6 +394,11 @@ androidExtensions {
experimental = true experimental = true
} }
// Generate Kotlin code and markdown docs for the Fenix Glean metrics.
ext.gleanGenerateMarkdownDocs = true
ext.gleanDocsDirectory = "$rootDir/docs"
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
dependencies { dependencies {
geckoNightlyImplementation Deps.mozilla_browser_engine_gecko_nightly geckoNightlyImplementation Deps.mozilla_browser_engine_gecko_nightly
geckoBetaImplementation Deps.mozilla_browser_engine_gecko_beta geckoBetaImplementation Deps.mozilla_browser_engine_gecko_beta
@ -539,7 +560,7 @@ dependencies {
// For the initial release of Glean 19, we require consumer applications to // For the initial release of Glean 19, we require consumer applications to
// depend on a separate library for unit tests. This will be removed in future releases. // depend on a separate library for unit tests. This will be removed in future releases.
testImplementation Deps.mozilla_service_glean_forUnitTests testImplementation "org.mozilla.telemetry:glean-forUnitTests:${project.ext.glean_version}"
} }
if (project.hasProperty("raptor")) { if (project.hasProperty("raptor")) {
@ -628,17 +649,6 @@ task buildTranslationArray {
android.defaultConfig.buildConfigField "String[]", "SUPPORTED_LOCALE_ARRAY", foundLocalesString android.defaultConfig.buildConfigField "String[]", "SUPPORTED_LOCALE_ARRAY", foundLocalesString
} }
def glean_android_components_tag = (
Versions.mozilla_android_components.endsWith('-SNAPSHOT') ?
'master' :
'v' + Versions.mozilla_android_components
)
// Generate markdown docs for the collected metrics.
ext.gleanGenerateMarkdownDocs = true
ext.gleanDocsDirectory = "$rootDir/docs"
apply from: 'https://github.com/mozilla-mobile/android-components/raw/' + glean_android_components_tag + '/components/service/glean/scripts/sdk_generator.gradle'
afterEvaluate { afterEvaluate {
// Format test output. Ported from AC #2401 // Format test output. Ported from AC #2401

View File

@ -34,8 +34,6 @@ object Versions {
const val mozilla_android_components = "35.0.0-SNAPSHOT" const val mozilla_android_components = "35.0.0-SNAPSHOT"
const val mozilla_glean = "25.0.0"
const val adjust = "4.18.3" const val adjust = "4.18.3"
const val installreferrer = "1.0" const val installreferrer = "1.0"
@ -127,7 +125,6 @@ object Deps {
"org.mozilla.components:service-sync-logins:${Versions.mozilla_android_components}" "org.mozilla.components:service-sync-logins:${Versions.mozilla_android_components}"
const val mozilla_service_firefox_accounts = "org.mozilla.components:service-firefox-accounts:${Versions.mozilla_android_components}" const val mozilla_service_firefox_accounts = "org.mozilla.components:service-firefox-accounts:${Versions.mozilla_android_components}"
const val mozilla_service_glean = "org.mozilla.components:service-glean:${Versions.mozilla_android_components}" const val mozilla_service_glean = "org.mozilla.components:service-glean:${Versions.mozilla_android_components}"
const val mozilla_service_glean_forUnitTests = "org.mozilla.telemetry:glean-forUnitTests:${Versions.mozilla_glean}"
const val mozilla_service_experiments = "org.mozilla.components:service-experiments:${Versions.mozilla_android_components}" const val mozilla_service_experiments = "org.mozilla.components:service-experiments:${Versions.mozilla_android_components}"
const val mozilla_service_location = "org.mozilla.components:service-location:${Versions.mozilla_android_components}" const val mozilla_service_location = "org.mozilla.components:service-location:${Versions.mozilla_android_components}"