I’m moving over an existing Gradle project to Kotlin and I’ve run into an issue where I can’t seem to override the source dir for the ANTLR plugin. The plugin adds an antlr property to the source sets but I cannot find any way to set it via Kotlin: https://docs.gradle.org/current/userguide/antlr_plugin.html#sec:antlr_source_set_properties
build.gradle (Groovy) example:
sourceSets {
customSourceSet {
antlr.srcDirs = ["$projectDir/customPath"]
}
}
build.gradle.kts (Kotlin) non-working, ‘antlr’ is unresolved:
sourceSets.create("customSourceSet")
sourceSets["customSourceSet"].antlr {
srcDir(file("$projectDir/customPath"))
}