Groovy script in resources directory

I have a config.groovy file in src/main/resources directory. It is actually a Groovy script, but the main code requires it as text, not compiled class.
However, compileGroovy task compiles it, and resulting jar has no resource inside, and config.class instead.
Is it intended behavior, or something wrong? And is there some simple workaround except changing filename extension?

I use Gradle 4.3.

This isn’t the default behavior, so you may have some configuration that’s causing this (e.g., adding src/main/resources as a source directory).

1 Like

Thanks!
Found out that I had src/main in groovy.srcDirs instead of src/main/groovy.