-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
49 lines (41 loc) · 1.56 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
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'antlr'
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'com.purecs.antlr4.macro'
version = '1.0.0-beta.4'
mainClassName = 'com.purecs.antlr4.macro.Main'
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/junit/junit
testCompile group: 'junit', name: 'junit', version: '4.12'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-simple
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
// https://mvnrepository.com/artifact/org.antlr/antlr4-runtime
compile group: 'org.antlr', name: 'antlr4-runtime', version: '4.7'
// https://mvnrepository.com/artifact/org.antlr/antlr4
antlr group: 'org.antlr', name: 'antlr4', version: '4.7'
// https://mvnrepository.com/artifact/commons-cli/commons-cli
compile group: 'commons-cli', name: 'commons-cli', version: '1.3.1'
}
// ANTLR process settings - https://docs.gradle.org/4.0.1/userguide/antlr_plugin.html#sec:controlling_the_antlr_generator_process
generateGrammarSource {
arguments << "-lib" << "src/main/antlr/"
maxHeapSize = '64m'
arguments += ['-visitor', '-long-messages']
}
// Fat jar
task fatJar(type: Jar) {
manifest {
attributes 'Main-Class': mainClassName
}
group = 'build'
baseName = 'antlr4-macro-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}