Fix a double-whammy of bugs:
- Fix an issue that prevented generated sources from being added to the main source set
- Fix an issue with lazy task configuration which meant that the implicit task dependency problem in Gradle 8.x wasn't actually resolved