2021-02-09 00:06:11 +00:00
|
|
|
plugins {
|
|
|
|
id 'antlr'
|
|
|
|
id 'java'
|
2021-05-29 13:25:17 +00:00
|
|
|
id "org.jetbrains.kotlin.jvm" version "1.5.10"
|
2021-02-09 00:06:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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')
|
|
|
|
|
|
|
|
// antlr('org.antlr:antlr4:4.9') {
|
|
|
|
// exclude group: 'com.ibm.icu', module: 'icu4j'
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
compileKotlin {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "11"
|
2021-02-26 00:10:00 +00:00
|
|
|
useIR = true
|
2021-02-09 00:06:11 +00:00
|
|
|
// verbose = true
|
|
|
|
// freeCompilerArgs += "-XXLanguage:+NewInference"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compileTestKotlin {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "11"
|
2021-02-26 00:10:00 +00:00
|
|
|
useIR = true
|
2021-02-09 00:06:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
|
|
srcDirs = ["${project.projectDir}/src"]
|
|
|
|
}
|
|
|
|
resources {
|
|
|
|
srcDirs = ["${project.projectDir}/res"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
test {
|
|
|
|
java {
|
|
|
|
srcDirs = ["${project.projectDir}/test"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task wrapper(type: Wrapper) {
|
|
|
|
gradleVersion = '6.7'
|
|
|
|
}
|