antlr-kotlin icon indicating copy to clipboard operation
antlr-kotlin copied to clipboard

Unresolved reference: AntlrKotlinTask with gradle 9.0

Open bingo-soft opened this issue 1 week ago • 3 comments

I could not find any working build.gradle.kts, so I just tried this:

plugins {
    kotlin("jvm") version "2.0.21"
    id("com.vanniktech.maven.publish") version "0.28.0"
    id("antlr")
    id("com.strumenta.antlr-kotlin") version "1.0.0"
}

group = "com.example"
version = "unspecified"

repositories {
    mavenCentral()
}

dependencies {
    antlr("org.antlr:antlr4:4.13.2")
    implementation("com.strumenta:antlr-kotlin-runtime:1.0.0")
}

val generateGrammarSource by tasks.registering(AntlrKotlinTask::class) {
    //...
}

And that gives me an error:

val generateGrammarSource by tasks.registering(AntlrKotlinTask::class) {
                                                          ^ Unresolved reference: AntlrKotlinTask

Do not know how to fix it. Thanks in advance!

bingo-soft avatar Feb 17 '25 06:02 bingo-soft