Replacing the Glean Gradle plugin in mozilla-central
Note: If you only need to replace the
glean_parser
Python parts used in the build see Substitutingglean_parser
. The approached documented in this chapter is only necessary if you changedGleanGradlePlugin.groovy
.
If you need to replace the Glean Gradle Plugin used by any component in mozilla-central, follow these steps:
-
In your Glean repository increment the version number in
.buildconfig.yml
to something unused:libraryVersion: 70.0.0
-
Build the Glean Gradle plugin and publish the plugin locally:
./gradlew glean-gradle-plugin:publishToMavenLocal
-
In your
mozilla-central
checkout, add the following line inmobile/android/fenix/settings.gradle
file in thepluginManagement
block:mavenLocal()
-
Use the new version number where the plugin is imported in
mobile/android/fenix/build.gradle
:classpath "org.mozilla.telemetry:glean-gradle-plugin:70.0.0"
This might need to be applied to the top-level
build.gradle
and otherbuild.gradle
files undermobile/android
to apply to all components.
Building Fenix will now use your locally published Glean Gradle Plugin.