should this work with environment properties?

I want to update a teamcity property 'x' remotely from the agent itself, in a unique build step, before the last step in which I will need that 'x' data within teamcity server.
I found this online, but it does not seem to work with gradle, even removing the pound symbols.

##teamcity[setParameter name='env.PROPERTY' value='something']

If there is no gradle option, what scripting language would this work in?
Also, where do i declare this property, do I do it in teamcity UI or on the agent config file, or both?

Please sign in to leave a comment.