-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle.kts
68 lines (58 loc) · 1.53 KB
/
build.gradle.kts
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
plugins {
id("java")
id("org.jetbrains.intellij") version "1.16.0"
id("antlr")
}
group = "antlr"
version = properties["pluginVersion"].toString()
repositories {
mavenCentral()
}
intellij {
version.set(properties["ideaVersion"].toString())
type.set("IC") // Target IDE Platform
pluginName.set("jetbrains-plugin-st4")
downloadSources = true
updateSinceUntilBuild = false
}
dependencies {
antlr("org.antlr:antlr4:${properties["antlr4Version"]}") {
exclude(group = "com.ibm.icu", module = "icu4j")
}
implementation("org.antlr:antlr4-intellij-adaptor:0.1")
implementation("org.antlr:antlr4-runtime:${properties["antlr4Version"]}")
testImplementation("junit:junit:4.13.2")
testImplementation("org.mockito:mockito-core:5.5.0")
}
sourceSets {
main {
antlr {
setIncludes(listOf("ST*.g4"))
}
}
}
// See https://github.com/gradle/gradle/issues/820#issuecomment-1585814999
configurations {
api {
setExtendsFrom(extendsFrom.filterNot { it == antlr.get() })
}
}
tasks {
// Set the JVM compatibility versions
withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
}
patchPluginXml {
sinceBuild.set("222.4554.10")
}
generateGrammarSource {
arguments = arguments + listOf(
"-package", "org.antlr.jetbrains.st4plugin.parsing",
"-long-messages",
"-no-visitor",
"-no-listener",
"-lib","src/main/antlr"
)
}
}