Replacing the Glean Gradle plugin in mozilla-central
Note: If you only need to replace the
glean_parserPython 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.ymlto something unused:libraryVersion: 70.0.0 -
Build the Glean Gradle plugin and publish the plugin locally:
./gradlew glean-gradle-plugin:publishToMavenLocal -
In your
mozilla-centralcheckout, add the following line inmobile/android/fenix/settings.gradlefile in thepluginManagementblock: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.gradleand otherbuild.gradlefiles undermobile/androidto apply to all components.
Building Fenix will now use your locally published Glean Gradle Plugin.