-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
141 lines (113 loc) · 4.12 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/5.2.1/userguide/tutorial_java_projects.html
*/
apply plugin: 'java'
apply plugin: 'com.google.protobuf'
apply plugin: "com.github.ben-manes.versions"
buildscript {
repositories {
maven { // The google mirror is less flaky than mavenCentral()
url "https://maven-central.storage-download.googleapis.com/repos/central/data/"
}
jcenter()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.13'
classpath "com.github.ben-manes:gradle-versions-plugin:0.30.0"
}
}
repositories {
maven {
//url "http://raw.github.com/ORGANIZATION/REPO/BRANCH"
url "https://gitlab.pic.es/LidarCTA/lidar-artifacts/raw/repository"
}
jcenter()
mavenLocal()
}
sourceCompatibility = 11
targetCompatibility = 11
//mainClassName = 'cat.ifae.cta.lidar.control.MotorsClient'
def grpcVersion = '1.31.1' // CURRENT_GRPC_VERSION
def protobufVersion = '3.13.0'
def protocVersion = '3.13.0'
dependencies {
implementation project(':libutil')
compileOnly "javax.annotation:javax.annotation-api:1.3.2"
implementation "com.google.api.grpc:proto-google-common-protos:1.18.1"
implementation "io.grpc:grpc-alts:${grpcVersion}"
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
implementation 'info.picocli:picocli:4.0.4'
implementation group: 'org.json', name: 'json', version: '20190722'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.13.3'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.13.3'
implementation group: 'com.google.guava', name: 'guava', version: '28.1-jre'
implementation group: 'net.harawata', name: 'appdirs', version: '1.2.0'
implementation group: 'org.slf4j', name:'slf4j-log4j12', version: '1.7.2'
testImplementation "io.grpc:grpc-testing:${grpcVersion}"
testImplementation 'junit:junit:4.13'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.28.2'
testImplementation group: 'junit', name: 'junit', version: '4.13'
testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '4.12.3'
}
test {
useJUnitPlatform()
testLogging {
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
proto {
srcDir 'src/main/lidar_proto/server_services'
}
resources {
srcDir 'properties'
include '*.properties'
include 'log4j2.xml'
}
}
}
apply plugin: 'application'
startScripts.enabled = false
task controlClient(type: CreateStartScripts) {
mainClassName="cat.ifae.cta.lidar.control.cli.Licli"
applicationName = "licli"
classpath = startScripts.classpath
outputDir = startScripts.outputDir
}
applicationDistribution.into('bin') {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from(controlClient)
fileMode = 0755
}
task runCli(type:JavaExec) {
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
main = project.hasProperty("mainClass") ? project.getProperty("mainClass") : "cat.ifae.cta.lidar.control.cli.Licli"
}