-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
85 lines (74 loc) · 2.21 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
description = "Simple Text Search Library"
group = 'com.github.before'
version = '1.0'
apply plugin: 'antlr'
apply plugin: 'java'
apply plugin: 'eclipse'
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.ltgt.gradle:gradle-apt-plugin:0.10"
}
}
apply plugin: "net.ltgt.apt"
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
}
}
apply plugin: 'com.github.johnrengelman.shadow'
sourceCompatibility = 1.7
jar {
manifest {
attributes 'Implementation-Title': description,
'Implementation-Version': version
}
}
ext.versions = [
antlr: "4.+",
assertj: "2.+",
immutables: "2.+",
junit: "4.+",
]
ext.antlr = [
grammarPackage: "com.github.before.ssqp",
antlrSource: 'src/main/antlr',
destinationDir: "build/src/main/generated"
]
repositories {
mavenCentral()
}
configurations {
antlr.exclude group: 'org.abego.treelayout'
antlr.exclude group: 'org.glassfish'
runtime.exclude module: 'antlr4'
}
dependencies {
antlr group: "org.antlr", name: "antlr4", version: versions.antlr
apt group: "org.immutables", name: "value", version: versions.immutables
compileOnly group: "org.immutables", name: "value", version: versions.immutables, classifier: 'annotations'
testCompile group: "org.assertj", name: "assertj-core", version: versions.assertj
testCompile group: "junit", name: "junit", version: versions.junit
runtime group: "org.antlr", name: "antlr4-runtime", version: versions.antlr
}
generateGrammarSource {
maxHeapSize = "64m"
arguments += ["-visitor", "-long-messages"]
arguments += ["-package", "com.github.before.ssqp"]
doLast {
copy {
from 'build/generated-src/antlr/main/'
include '*.*'
filter { it.replaceAll('public class', 'class').replaceAll('public interface', 'interface') }
into 'build/generated-src/antlr/main/com/github/before/ssqp'
}
project.delete fileTree('build/generated-src/antlr/main').include('*.*')
}
}