I split it up into Build, BuildData and PathCodeBuilder. I am open for suggestions how to rename this stuff.
One question is how to expose the PathCodeBuilder to plugins, and how to expose the BuildData to the PathCodeBuilder. The way I made this for now works, but is not ideal.

I would like to keep the plugin signature nice and simple. And I want that the Build and BuildData and PathCodeBuilder are only available in the generate() method, and not in e.g. the addPackage().