Gradle version is 7.4.2 running on Java 17
# community-support
y
Gradle version is 7.4.2 running on Java 17
๐Ÿงต 1
v
Please do not split topics across several threads. This makes following the conversation in the threads view very hard as the context of the other messages is missing. If you have additional information either edit the original message or post to its thread. Regarding the problem, actually using legacy script plugins (the things you use with "apply from") has many quirks and is highly discouraged anyway. But besdies that, to answer the question, it might be necessary that you provide an MCVE that demonstrates your situation and the issue you have.
y
Sorry for the mess. Will consolidate the message next time. We have the requirement to use the buildscript becuse we need to manage one of the plugin versions in a centralized way, and the plugins block doesn't support the version defined in a map and used like
<http://versions.my|versions.my>_plugin_version
v
Defining versions (also for plugins) in a central place is best done using version catalogs, they can even be published and reused in totally unrelated builds. And to centralize build logic there are convention plugins in
buildSrc
or an included build or also published for usage in unrelated builds, for example implemented as precompiled script plugins.
๐Ÿ™‚
But as I said, these are "just" strong recommendations by me. To answer the actual question you really would need to provide an MCVE imho. ๐Ÿ™‚
y
I tried to create an MCVE yet not successful. With a minimal project structure mimicking my project, the rootProject.projectDir is always correct
Ah... nvm I think I found a settings.gradle in the failing subproject...
๐Ÿ‘Œ 1
v
Yeah, a project should never ever ever ever ever ever ever be included by more than one build.
Only ever include whole builds with
includeBuild
if necessary