Hello jendrik,
thank you for the interesting insights. I’ll try to transform your suggestion into our companies war plugin wrapper (we provide prepared plugins that do a lot of default configurations without a single line of build.gradle dsl) and report back.
The documentation you linked is for Gradle 6.0 (we’re currently at 5.5.1) but the AdHocComponentWithVariants should already work, right? If I got it right then maybe the chapter Creating and publishing custom components may be even worth a try.
kind regards
Daniel