Hi Everyone,
At the moment runtime config is not really handled very well. In order to pass it into a recorder it needs to first be passed through a @BuildStep @Record method. This is confusing as there is nothing valid that this build step can do with the object except pass it to a recorder, however we can't stop a build step from accidently trying to read a runtime value at build time.
This is problematic because runtime config can change, so build steps should never be looking at these values at build time. There are a few issues around this in the issue tracker (e.g. [1][2]), but we have just never got around to solving it.
To solve this I have implemented constructor injection into recorders for config objects [3]. Basically this means that you can avoid passing config into recorders from build steps altogether, and instead just use constructor injection and final fields.
One thing I am not sure about is if we should wait for the next release for this, given that this is supposed to be a stabilization release. I think it is ok as the changes will be extensively tested, however I would like to hear what others think.
Once this is in I can go through and update the extensions to use this as much as possible, but that has a high chance of conflict so I don't want to do it until it is in.
Stuart