Hi there! Is it possible to process non-kt files d...
# arrow-meta
n
Hi there! Is it possible to process non-kt files during compilation? I would like to provide types from files such as open api specification. Can think of 2 possible ways to do it: gradle plugin and compiler plugin. Gradle clearly has access to resource files in source sets, but lacks syntax and semantics checks, and it is less obvious how to provide IDEA support. As for compiler, i really have no clue :(
f
Hi,compiler plugins are just usual jvm programs, you can read your files in your code and generate what ever you want with it
j
you can write an ANTLR grammar for it, i did exactly this for SQL files sitting inside my resources directory https://github.com/JVAAS/jvaas-postgresql
then you can just wire in that processing step into your Grade build, shout if you need an example