How to exclude a Kotlin file?

Viewed 133

I wish to exclude a Kotlin file from my build.

Trying something like:

sourceSets {
    main {
        kotlin {
            exclude '**/Test.kt'
        }
    }
}

Doesn't work, the file gets compiled.

I have searched endlessly and similar questions on StackOverflow have no working answer and zero activity, and it's hard to believe that such a simple goal is so hard to achieve.

0 Answers
Related