-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.gradle
70 lines (57 loc) · 1.33 KB
/
build.gradle
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
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id "org.jetbrains.intellij" version "0.6.5"
}
apply plugin: 'idea'
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'java'
apply plugin: 'antlr'
intellij {
version = ideaVersion
pluginName 'P4 Plugin'
}
group 'org.p4.p4plugin'
version pluginVersion
wrapper {
gradleVersion "6.0.1"
}
compileJava {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
sourceSets {
main {
java {
}
}
}
repositories {
mavenCentral()
}
// See https://github.com/gradle/gradle/issues/820#issuecomment-288838412
configurations {
compile {
extendsFrom = extendsFrom.findAll { it != configurations.antlr }
}
}
dependencies {
antlr("org.antlr:antlr4:$antlr4Version") { // use ANTLR version 4
exclude group:'com.ibm.icu', module:'icu4j'
}
implementation "org.antlr:antlr4-intellij-adaptor:0.1"
implementation "org.antlr:antlr4-runtime:$antlr4Version"
testImplementation group: 'junit', name: 'junit', version: '4.13.1'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.6.28'
}
generateGrammarSource {
arguments += [
"-package", "org.p4.p4plugin.parsing",
"-long-messages",
"-no-visitor",
"-lib","src/main/antlr"
]
}