Also, another nube question - should I specify plu...
# community-support
e
Also, another nube question - should I specify plugin in root gradle if I ever have to use it in modules?
j
Applying the plugin in the root project with apply false or true ensure using the same version in all modules
e
Ah, so it is not mandatory
And if all aliases from version catalogue the versioning question is also clear
j
No, you can even remove the root build gradle file and have subprojects if you have configured the repositories in the settings one
e
Any performance implication? Or I wonder why we all still have root gradle file
we are still mentioning same plugins in the modules for apply false plugins
j
I think it is not only the version, but about the classpath too
1
v
It *might*y be necessary to have a plugin in the root project or in another way in a common classloader like as dependency in
buildSrc
or being present in the settings script classpath. Some plugins need to cooperate on application in different projects, for example using a shared build service. If you don't have the plugin in a common classloader, the classes are not the same and it does not work. But I would only do that if it is necessary, otherwise it is just visual clutter
Why "we all" still have root project build script is the wrong question. I still have one on most projects because I also have the code in it. But if there is no content in the root project, I also do not have the build script, there is no real difference. And if you use one of the
init
modes that creates that "code in subproject" structure it will also not have a root project build script. So that "we all have root project build scripts" is just plainly wrong
Some might prefer having one to show that the directory is a Gradle project. But imho if it is empty, delete it.
e
Thank you people
👌 1