From b26e07c5f2a369d43c6bbf7d6c4bf9028b15f454 Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Fri, 24 Feb 2023 17:20:46 -0500 Subject: [PATCH] Bug 1818826 - Remove Android Component Nimbus gradle plugin wrapper --- app/build.gradle | 5 ++--- messaging.fml.yaml => app/messaging.fml.yaml | 0 nimbus.fml.yaml => app/nimbus.fml.yaml | 2 +- build.gradle | 15 +-------------- 4 files changed, 4 insertions(+), 18 deletions(-) rename messaging.fml.yaml => app/messaging.fml.yaml (100%) rename nimbus.fml.yaml => app/nimbus.fml.yaml (99%) diff --git a/app/build.gradle b/app/build.gradle index a3956f4100..5d3cf89067 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -433,14 +433,12 @@ android.applicationVariants.all { variant -> // Generate Kotlin code for the Fenix Glean metrics. apply plugin: "org.mozilla.telemetry.glean-gradle-plugin" -apply plugin: "org.mozilla.components.nimbus-gradle-plugin" +apply plugin: "org.mozilla.appservices.nimbus-gradle-plugin" nimbus { // The path to the Nimbus feature manifest file manifestFile = "nimbus.fml.yaml" // The fully qualified class name for the generated features. - // If the classname begins with a '.' this is taken as a suffix to the app's package name - destinationClass = ".nimbus.FxNimbus" // 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. @@ -455,6 +453,7 @@ nimbus { // and used to inform experiment configuration. experimenterManifest = ".experimenter.yaml" } + configurations { // There's an interaction between Gradle's resolution of dependencies with different types // (@jar, @aar) for `implementation` and `testImplementation` and with Android Studio's built-in diff --git a/messaging.fml.yaml b/app/messaging.fml.yaml similarity index 100% rename from messaging.fml.yaml rename to app/messaging.fml.yaml diff --git a/nimbus.fml.yaml b/app/nimbus.fml.yaml similarity index 99% rename from nimbus.fml.yaml rename to app/nimbus.fml.yaml index f726c5b186..54b80fadea 100644 --- a/nimbus.fml.yaml +++ b/app/nimbus.fml.yaml @@ -10,7 +10,7 @@ channels: - nightly - developer includes: - - ./messaging.fml.yaml + - messaging.fml.yaml features: homescreen: description: The homescreen that the user goes to when they press home or new tab. diff --git a/build.gradle b/build.gradle index 9a2b612ea5..abcdcd0c42 100644 --- a/build.gradle +++ b/build.gradle @@ -65,20 +65,7 @@ buildscript { classpath FenixDependencies.androidx_safeargs classpath FenixDependencies.osslicenses_plugin classpath "org.mozilla.telemetry:glean-gradle-plugin:${Versions.mozilla_glean}" - // NOTE: The Nimbus plugin needs to be refactored into a top-level plugin - // and consumed via includeBuild (using composite builds). This is a short-term - // workaround to consume the latest version of the Nimbus plugin matching the Focus version. - if (Config.readVersionFromFile().contains("a")) { - // Use the latest version of the plugin on the main branch (nightly). - classpath("org.mozilla.components:tooling-nimbus-gradle:latest.release") - } else { - // Use the latest version matching the major version of the branch (beta/release). - classpath("org.mozilla.components:tooling-nimbus-gradle") { - version { - strictly("${Config.majorVersion()}.+") - } - } - } + classpath "org.mozilla.appservices:tooling-nimbus-gradle:${Versions.mozilla_appservices}" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files