This message was deleted.
# community-support
s
This message was deleted.
d
The
gradle.startParameters
is mutable to some extend but it should be treated as immutable once the build starts. The mutability comes from the fact that launching a build somewhat uses
StartParameters
as input. Once the build starts, it should be treated as immutable (build starts == initialization/configuration phase).
☝️ That is my general rule of thumb.
t
yeah, same. but that just makes me want to repeat: there's a missing feature here
☝️ 1
πŸ‘ 2
p
What Daniel said πŸ‘ It should have been immutable from the start πŸ™„
By the time you can mutate
StartParameters
the decision to use the configuration cache has already been made. IOW it’s too late.
j
a task which write to the user home gradle properties should be feasible by checking the git email or something so for example
but it add cc to all repos :/
t
yes
j
maybe gradle can check local properties too for this feature
or even better those properties could be set in the settings file so every dev can set it in a flexible way
Is there any reason those properties are passed via gradle project properties and not via a dsl in the settings?
t
too late in the build to adjust that behavior, I'd imagine
j
a special block similar to the plugins block in the settings file should be ideal
I talked with @Vampire about a "similar" problem which would be resolved with another phase. When a plugin conditionally applies other plugins based on a configuration in the extension, it doesn't generate the accessors and you can't even access to the extension if you don't do that after the configured extension block. A phase with a custom block which can be read by Gradle so it can generate the dummy project after checking it would solve that. This use case for the settings file should be similar, a block that Gradle should read ahead
v
Or simply the desparately missing
gradle-local.properties
possibility: https://github.com/gradle/gradle/issues/12283
πŸ’― 2
t
yes that is exactly the kind of thing I was thinking of, Vampire
v
Then bring up more uservoice. Gradle guys think it would be more confusing and not helping, while it imho is an essential possibility. I sometimes even make manual namespacing for properties, so that I can use
x
in the project
gradle.properties
or on the command line, but
project-a.x
or
project-b.x
in the
<GRADLE_USER_HOME>/gradle.properties
as I want different values for different builds. I think the only way to get it is to gather enough user-pressure so they add the possibility eventually.
t
I commented on the issue