I'm trying to write a code generating task. This c...
# general
I'm trying to write a code generating task. This core logic require to run javac with a specfic jar in the classpath and a given set of arguments. So far I've written this:
Copy code
class QueryDslGen(SimpleCodegenTask, JavacCompile):
    def __init__(self, *args, **kwargs):
        super(QueryDslGen, self).__init__(*args, **kwargs)

    def synthetic_target_type(self, target):
        return JavaLibrary

    def is_gentarget(self, target):
        return isinstance(target, QueryDslLibrary)

    def execute_codegen(self, target, target_workdir):
        if not isinstance(target, QueryDslLibrary):
            raise TaskError('Invalid target type "{class_type}" (expected QueryDslLibrary)'

        result = ???

        if result != 0:
            raise TaskError('twirl-gen ... exited non-zero ({code})'.format(code=result))

    def get_args_default(cls, bootstrap_option_values):
        return super(JavacCompile, cls).get_args_default(cls, bootstrap_option_values) + ('-proc:only', '-processor', 'com.querydsl.apt.jpa.JPAAnnotationProcessor', '-s', target_workdir)
obviously I cannot use the
to pass the argument since I need the
value passed to
. I suppose I need to use
somehow but I'm not sure how. Furthermore I'm a complete python newbie so I'm not sure how python will work with regards to the multiple inheritance and the diamond I've got here