forked from Ecdar/j-Ecdar
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
99 lines (87 loc) · 2.16 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
plugins {
id 'java'
id 'application'
id 'java-library'
id 'com.google.protobuf' version '0.8.17'
id 'antlr'
}
repositories {
mavenCentral()
}
java{
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
mainClassName = "JECDAR"
dependencies {
testImplementation "junit:junit:4.12"
implementation 'io.grpc:grpc-netty-shaded:1.42.0'
implementation 'io.grpc:grpc-protobuf:1.42.0'
implementation 'io.grpc:grpc-stub:1.42.0'
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
implementation 'commons-cli:commons-cli:1.4'
implementation 'org.jdom:jdom2:2.0.6'
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
antlr "org.antlr:antlr4:4.10.1"
implementation 'org.antlr:antlr4-runtime:4.10.1'
implementation files('lib/jcdd.jar')
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.17.3"
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.42.0'
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
}
generateGrammarSource {
maxHeapSize = "128m"
arguments += ["-visitor", "-no-listener"]
}
sourceSets {
main {
java {
srcDirs = ['src', 'build/generated', 'build/generated-src/antlr/main']
}
proto{
srcDirs = ['src/proto']
}
antlr{
srcDirs = ['src/antlr']
}
}
test {
java {
srcDirs = ['test']
}
}
}
task fatJar(type: Jar) {
manifest {
attributes(
'Main-Class': 'connection.Main',
)
}
classifier = 'fat'
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
with jar
}
task submodulesUpdate(type:Exec) {
description 'Updates (and inits) git submodules'
commandLine 'git', 'submodule', 'update', '--init', '--recursive'
group 'Build Setup'
}