-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
85 lines (72 loc) · 2 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.19"
}
}
apply plugin: "idea"
apply plugin: "java-library"
apply plugin: "com.google.protobuf"
apply plugin: "maven-publish"
ext {
semVersion = "0.0.1"
fullVersion = semVersion + "+" + ('git rev-list --count HEAD'.execute().text.trim())
nettyVersion = "4.1.78.Final"
lombokVersion = "1.18.24"
protobufVersion = "3.21.2"
log4jVersion = "2.17.2"
grpcVersion = "1.47.0"
javaxVersion = "1.3.2"
}
group 'com.husbylabs'
version "$fullVersion"
repositories {
mavenCentral()
}
dependencies {
implementation "io.netty:netty-buffer:$nettyVersion"
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
implementation "io.grpc:grpc-netty-shaded:$grpcVersion"
implementation "io.grpc:grpc-protobuf:$grpcVersion"
implementation "io.grpc:grpc-stub:$grpcVersion"
api "javax.annotation:javax.annotation-api:$javaxVersion"
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
}
publishing {
repositories {
if (System.getenv("MAVEN_USERNAME") != null && System.getenv("MAVEN_PASSWORD")) {
maven {
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
name = "HusbyLib"
url = "https://maven.husbylabs.com/releases"
}
}
}
publications {
maven(MavenPublication) {
groupId = "com.husbylabs"
artifactId = "warptables"
version = project.version
from components.java
}
}
}
test {
useJUnitPlatform()
}
protobuf {
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
}
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}