plugins { id 'antlr' id 'java' id "org.jetbrains.kotlin.jvm" version "1.5.10" } targetCompatibility = 11 sourceCompatibility = 11 repositories { mavenCentral() } configurations { // strange antlr plugin issue, see https://github.com/gradle/gradle/issues/820 // this avoids linking in the complete antlr binary jar compile { extendsFrom = extendsFrom.findAll { it != configurations.antlr } } } dependencies { antlr 'org.antlr:antlr4:4.9' implementation 'org.antlr:antlr4-runtime:4.9' implementation project(':parser') testImplementation "org.jetbrains.kotlin:kotlin-test-junit5" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.2' testImplementation 'org.hamcrest:hamcrest-junit:2.0.0.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.2' // antlr('org.antlr:antlr4:4.9') { // exclude group: 'com.ibm.icu', module: 'icu4j' // } } compileKotlin { kotlinOptions { jvmTarget = "11" useIR = true // verbose = true // freeCompilerArgs += "-XXLanguage:+NewInference" } } compileTestKotlin { kotlinOptions { jvmTarget = "11" useIR = true } } sourceSets { main { java { srcDirs = ["${project.projectDir}/src"] } resources { srcDirs = ["${project.projectDir}/res"] } } test { java { srcDirs = ["${project.projectDir}/test"] } } } test { // Enable JUnit 5 (Gradle 4.6+). useJUnitPlatform() // Always run tests, even when nothing changed. dependsOn 'cleanTest' // Show test results. testLogging { events "skipped", "failed" } } task wrapper(type: Wrapper) { gradleVersion = '6.7' }