hi all! does anyone know if it is possible to have...
# server
l
hi all! does anyone know if it is possible to have different kotlin compiler options in gradle (like allWarningsAsErrors) for generated code and for project itself? what we try to solve is: we have swagger specs and generate client code from them, if we generate it to kotlin, the code is not passing allWarningsAsErrors 😞 but we want to enforce allWarningsAsErrors for our own code. i understand that it’s better to fix code generation, but it might take longer.
b
One way to solve it would be to move all swagger gen to a separate module
Then you can control all the flags for that code only
l
do you mean gradle module?
b
Correct
l
ok, should work. but i would still love to have a more natural way to treat generated code like library code and do not care about warnings in it. or do i miss anything here?
b
Also, to answer your question, I don't think it's possible to control where the flag is applied. It's either for the entire module or none.
☝️ 1
Moving all codegens in a separate module is a clean approach, because then you draw a clear line between your main and generated code
☝️ 1