Having trouble ignoring directories during Gradle build --continous

I am referencing the guides here:


Which says (for Kotlin DSL);

sourceSets["main"].withConvention(KotlinSourceSet::class) {    

I currently have webpack building assets and I use gradle build --continuous -x test to build based on changes to my .kt files. However, my assets after being built are stored in src/main/resources/static to be packaged with the application.

Is it possible to ignore this directory or particular files (js, css) during a --continuous build?

I’ve tried a lot of configurations with kotlin.exclude but cannot get Gradle to ignore anything.