My “settings.gradle” contains only: rootProject.name = ‘rpn’
If I run “build -b build.gradle tasks”, the project name is reported as “rpn”.
If I move my “build.gradle” then apparently, though projects are directory-based, Gradle seems to run the build file with some new, non-root project, since the rootProject.name assignment runs but no longer has any effect.
Copy and paste showing that settings. gradle works to change project name, but only if it’s named “build.gradle”:
s5ubis@s5ubis-pc$ gradle --no-color -b build.gradle tasks | grep dependenc dependencies - Displays the dependencies of root project 'rpn'. s5ubis@s5ubis-pc$ mv -v build.gradle moved.gradle 'build.gradle' -> 'moved.gradle' s5ubis@s5ubis-pc$ gradle --no-color -b moved.gradle tasks | grep dependenc dependencies - Displays the dependencies of root project 'gra2'. s5ubis@s5ubis-pc$
This is important for me. Due to multiple limitations of Gradle that I am working around, I have to use different build files for different usage scenarios, and I need the project name to be correct.