-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
52 lines (42 loc) · 1.36 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
52 lines (42 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
plugins {
id("java")
id("antlr")
id("application")
}
group = "org.yyubin"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
antlr("org.antlr:antlr4:4.13.1")
implementation("org.antlr:antlr4-runtime:4.13.1")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("com.google.code.gson:gson:2.10.1")
implementation("info.picocli:picocli:4.7.5")
implementation("io.github.cdimascio:dotenv-java:3.0.0")
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
tasks.generateGrammarSource {
maxHeapSize = "64m"
arguments = arguments + listOf("-visitor", "-long-messages", "-package", "org.yyubin.lpdl.parser")
outputDirectory = file("src/main/java/org/yyubin/lpdl/parser")
}
tasks.test {
useJUnitPlatform()
}
application {
mainClass.set("org.yyubin.lpdl.Main")
}
// NaturalLanguageCompiler 실행을 위한 별도 task
tasks.register<JavaExec>("nlcompile") {
group = "application"
description = "자연어를 LPDL을 거쳐 SQL로 변환합니다"
classpath = sourceSets["main"].runtimeClasspath
mainClass.set("org.yyubin.lpdl.NaturalLanguageCompiler")
// 커맨드라인 인자 전달
if (project.hasProperty("args")) {
args = (project.property("args") as String).split("\\s+".toRegex())
}
}