This is a follow up question to this one for context.
I have a Gradle task as follows:
test { doLast { def profile = project["spring.profi