-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
174 lines (158 loc) · 5.72 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
plugins {
id "java"
id "com.google.protobuf" version "0.8.14"
id "maven"
id "maven-publish"
id "signing"
}
group = 'io.github.robocup-logistics'
archivesBaseName = "java-sdk"
version = '0.1.19.1'
description = ""
sourceCompatibility = 1.11
targetCompatibility = 1.11
repositories {
maven { url "https://repo.maven.apache.org/maven2" }
}
dependencies {
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.16.1'
implementation 'org.apache.logging.log4j:log4j-api:2.17.2'
implementation 'org.apache.logging.log4j:log4j-core:2.17.2'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.10.3'
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.10.3'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.3'
// https://mvnrepository.com/artifact/commons-logging/commons-logging
implementation group: 'commons-logging', name: 'commons-logging', version: '1.1.1'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.5.2'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.15.0'
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
testImplementation 'org.projectlombok:lombok:1.18.12'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.1.0'
// https://mvnrepository.com/artifact/org.assertj/assertj-core
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.15.0'
}
signing {
if (project.findProperty("signing.keyId") != "") {
println("Using signing from gradle.properties!")
sign publishing.publications
} else {
println("Setting signing params!")
project.setProperty("signing.keyId", System.getenv("SIGNINGKEYID"))
project.setProperty("signing.password", System.getenv("SIGNINGPASSWORD"))
project.setProperty("signing.secretKeyRingFile", "/home/runner/work/rcll-java/rcll-java/.gnupg/secring.gpg")
sign publishing.publications
}
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/robocup-logistics/rcll-java")
credentials {
username = project.findProperty("gprUser") != "" ? project.findProperty("gprUser") : System.getenv("USERNAME")
password = project.findProperty("gprToken") != "" ? project.findProperty("gprToken"): System.getenv("TOKEN")
}
}
maven {
name = "SonarStaging"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.findProperty("ossrhUsername") != "" ? project.findProperty("ossrhUsername") : System.getenv("OSSRHUSERNAME")
password = project.findProperty("ossrhPassword") != "" ? project.findProperty("ossrhPassword"): System.getenv("OSSRHPASSWORD")
}
}
}
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
name = 'Java SDK'
description = 'Java SDK for the RoboCup Logistics League'
url = 'https://ll.robocup.org/'
licenses {
license {
name = 'GNU General Public License 3'
url = 'https://www.gnu.org/licenses/gpl-3.0.de.html'
}
}
developers {
developer {
id = 'pkohout'
name = 'Peter Kohout'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com:grips-robocup/aruco_ros.git'
developerConnection = 'scm:git:ssh://github.com:grips-robocup/aruco_ros.git'
url = 'https://github.com/robocup-logistics/rcll-java'
}
}
}
}
}
protobuf {
// Configure the protoc executable
generatedFilesBaseDir = "$projectDir/src/generated"
protoc {
// Download from repositories
artifact = 'com.google.protobuf:protoc:3.16.1'
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
}
cpp {
}
}
}
}
}
configurations {
generatedCompile.extendsFrom compile
}
sourceSets {
generated {
java {
srcDir 'src/generated/main/java'
dependencies {
compile group: 'com.google.protobuf', name: 'protobuf-java', version: '3.16.1'
}
}
}
main {
compileClasspath += generated.compileClasspath + generated.output
proto {
// In addition to the default 'src/main/proto'
srcDir 'rcll-refbox/src/msgs/'
srcDir 'rcll-refbox/src/libs/logging/llsf_log_msgs'
}
java {
}
}
test {
proto {
}
}
}
tasks.clean.doFirst { deleteGeneratedSourceSet }
task deleteGeneratedSourceSet {
println "Deleting: " + new File(".").absolutePath + "/src/generated/"
delete new File(".").absolutePath + "/src/generated/"
println "Finished deleteGeneratedSourceSet"
}
test {
useJUnitPlatform()
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}