Locking dependencies in buildSrc

When I run gradle dependencies --write-locks on my project, the resulting files in gradle/dependency-locks don’t appear to contain anything related to the buildSrc project. When I run the same command inside the buildSrc directory, it doesn’t appear to write anything at all. How can I lock the dependencies of my buildSrc project?

Hi David, I faced the same problem in my project, what I did was adding the following block to buildSrc/build.gradle:

dependencyLocking { lockAllConfigurations() }

And then run the following command to generate lock files:

./gradlew dependencies -p buildSrc --write-locks

and it worked fine for me.