forked from temporalio/sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
77 lines (62 loc) · 2.78 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
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
description = '''Temporal Java SDK and Testing Framework with gRPC, Protobuf 3 and Guava shaded'''
ext {
perfmarkVersion = '0.26.0'
}
dependencies {
// serviceclient + sdk
api(platform("com.fasterxml.jackson:jackson-bom:$jacksonVersion"))
api(platform("io.micrometer:micrometer-bom:$micrometerVersion"))
api ("com.uber.m3:tally-core:$tallyVersion")
api "org.slf4j:slf4j-api:$slf4jVersion"
api "com.google.code.gson:gson:$gsonVersion" //also needed for protobuf
api "io.micrometer:micrometer-core"
api "com.fasterxml.jackson.core:jackson-databind"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8"
//test server
implementation "com.cronutils:cron-utils:${cronUtilsVersion}"
// grpc wants perfmark and we don't want to shade it
implementation "io.perfmark:perfmark-api:$perfmarkVersion"
// we have to flat the dependency tree here and disable inclusion of transitive dependencies
// below to have a fine control over what is included. The main reason is we don't want to explicitly filter out
// all deps of our temporal modules on all depths except some
// See https://github.com/johnrengelman/shadow/issues/31#issuecomment-32473844
// temporal
shadow project(':temporal-serviceclient')
shadow project(':temporal-test-server')
shadow project(':temporal-sdk')
shadow project(':temporal-testing')
// protobuf
shadow "com.google.protobuf:protobuf-java:$protoVersion"
shadow "com.google.protobuf:protobuf-java-util:$protoVersion"
// guava
shadow "com.google.guava:failureaccess:1.0.1"
shadow "com.google.guava:guava:$guavaVersion"
// grpc
shadow "io.grpc:grpc-protobuf-lite:$grpcVersion"
shadow "io.grpc:grpc-protobuf:$grpcVersion"
shadow "io.grpc:grpc-api:$grpcVersion"
shadow "io.grpc:grpc-core:$grpcVersion"
shadow "io.grpc:grpc-context:$grpcVersion"
shadow "io.grpc:grpc-stub:$grpcVersion"
shadow "io.grpc:grpc-netty-shaded:$grpcVersion"
shadow "io.grpc:grpc-services:$grpcVersion"
}
// to have a fine grain control, we spell out what we include
configurations.shadow {
transitive = false
}
shadowJar {
configurations = [project.configurations.shadow]
relocate 'gogoproto', 'io.temporal.shaded.gogoproto' //protobuf
relocate 'com.google.protobuf', 'io.temporal.shaded.com.google.protobuf'
relocate 'com.google.common', 'io.temporal.shaded.com.google.common' // guava
relocate 'com.google.thirdparty', 'io.temporal.shaded.com.google.thirdparty' // guava
relocate 'io.grpc', 'io.temporal.shaded.io.grpc'
mergeServiceFiles()
archiveClassifier.set("")
}
shadowJar.shouldRunAfter(jar)