This message was deleted.
# community-support
s
This message was deleted.
j
are you doing that on the settings file?
If you set it on that project specifically, the issue persists?
m
In the settings file. If I do it in the project build.gradle it works fine. But I would like to define it globally for all project (btw I tried setting it on rootproject as well)
j
maybe you can use other lambdas, like
gradle.beforeProject
or
gradle.projectsLoaded
👀 1
m
unfortunately, doesn't help 😞
😞 1
v
The easiest is, to not set it in code at all.
I usually set those two in the root projects
gradle.properties
, which makes them available to all subprojects too
Unless you need to calculate them in any way of course
m
I was sure that was gonna help, but to my surprise the result is the same - group is accessible during sync, but empty during publishing - both project.group and rootProject.group. And the same error occurs. Even weirder - it breaks the publication for projects that worked before, but with a different error:
Copy code
> Failed to publish publication 'maven' to repository 'mavenLocal'
   > Invalid publication 'maven': groupId ("com.example") is not a valid Maven identifier ([A-Za-z0-9_\-.]+).
v
It is a properties file, not Kotlin code
Remove the quotes
m
omg
v
😉
m
yeah, that helped for the second issue 😄 but still empty for the plugin project. I'm probably doing something stupid there as well...
v
Is it really a subproject, or is it a subbuild?
m
All 3 are included via include. Not via includeBuild
v
Do you maybe explicitly set it to empty in the plugin project?
If again no, I'm out of ideas without an MCVE
j
looks like another plugin/config is overriding it to null
m
maybe
gradlePlugin
clause is doing sth like that...
if anyone stumbles upon a similar problem. I had two
settings.gradle.kts
files. One in the root project and one in the plugin project đŸ€Š Completely missed that, it was some garbage after migration from one repo to another...
👌 1