Slackbot
03/01/2022, 11:25 AMJuan Paulo Breinlinger
03/01/2022, 11:26 AMFAILURE: Build failed with an exception.
* Where:
Build file '/home/jbrein/data/customers/waitrose/repos/helpers/gradle/test/build.gradle' line: 21
* What went wrong:
A problem occurred evaluating root project 'test'.
> Could not set unknown property 'greeter' for root project 'test' of type org.gradle.api.Project.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
BUILD FAILED in 414msVampire
03/01/2022, 11:36 AMVampire
03/01/2022, 11:36 AMVampire
03/01/2022, 11:40 AMproject that does not exist in line 21.
And even if that worked, for example because you declare it as local variable by prefixing it with def , then line 25 is just a no-op assigning a property to itself.Thomas Broyer
03/01/2022, 11:40 AMdef declaring it, but then this likely won't work as intended due to scoping:
def greeterVar = 'test'
greeting {
message = 'Hi'
greeter = greeterVar // naming the variable 'greeter' would read the greeter property of the greeting extension, not the variable
}Juan Paulo Breinlinger
03/01/2022, 11:41 AMJuan Paulo Breinlinger
03/01/2022, 11:42 AMJuan Paulo Breinlinger
03/01/2022, 11:42 AMJuan Paulo Breinlinger
03/01/2022, 11:42 AMJuan Paulo Breinlinger
03/01/2022, 11:42 AMVampire
03/01/2022, 11:42 AMJuan Paulo Breinlinger
03/01/2022, 11:42 AMJuan Paulo Breinlinger
03/01/2022, 11:43 AMVampire
03/01/2022, 11:45 AM