Hi - I saw Pulumi is adding parameterized providers that can return different schema according to variable passed to them - something like that. Long time ago I've prepared Gradle plugin for generating Java and Kotlin classes locally:
https://github.com/andrzejressel/pulumi-gradle-plugin. While I'm not interested in Pulumi Java anymore, maybe this plugin may helpful for some of you or be treated as a base for improved plugin.