Jonathan Carter
05/02/2024, 7:10 PM@Option annotation to an abstract method (like those defined on an interface) unless it takes a boolean. See, for example, the UrlProcess example under the "Documenting available values..." heading. While there's an Option annotation on the abstract getHttp method, the URL string has a concrete setter & getter method.
If I try just adding the @Option annotation to new setter methods on the interface, the plugin fails to apply. See (00536a1ade7dd)
If I try adding default implementations to the setters, even in a separate interface, just for the setters (see 074302bc9ce0), I get errors like:
Could not generate a decorated class for type JMHTask. > Cannot have abstract method JmhParameters.getIncludes().. In other words, adding concrete setters of any kind breaks the abstract getters. Yet the getters being abstract is relied on for other parts of the plugin!)
If I just add concrete setter methods to the task class (which is abstract), and throw the @Option annotations on those, and make the getter methods concrete, the plugin itself fails because it's built to rely on generating properties from the abstract class (see b7b1a38312).
Anyone got any tips on adding command line options to Gradle tasks in a way that still lets you have abstract getters? Documentation says there's no programmatic way to do it, so I figure I'm stuck with making the annotation work.