forked from temporalio/samples-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
113 lines (92 loc) · 4.16 KB
/
build.gradle
File metadata and controls
113 lines (92 loc) · 4.16 KB
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
// Run 'gradle checkUpdates' to find out which dependencies have newer versions
plugins {
id 'org.cadixdev.licenser' version '0.6.1'
id "net.ltgt.errorprone" version "3.0.1"
id 'com.diffplug.spotless' version '6.17.0' apply false
}
apply plugin: 'java'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
mavenCentral()
}
ext {
otelVersion = '1.24.0'
otelVersionAlpha = "${otelVersion}-alpha"
javaSDKVersion = '1.19.0'
}
dependencies {
// Temporal SDK
implementation "io.temporal:temporal-sdk:$javaSDKVersion"
implementation "io.temporal:temporal-opentracing:$javaSDKVersion"
testImplementation("io.temporal:temporal-testing:$javaSDKVersion")
// Needed for SDK related functionality
implementation(platform("com.fasterxml.jackson:jackson-bom:2.14.2"))
implementation "com.fasterxml.jackson.core:jackson-databind"
implementation "com.fasterxml.jackson.core:jackson-core"
implementation "io.micrometer:micrometer-registry-prometheus"
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.11'
implementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.7.0'
implementation(platform("io.opentelemetry:opentelemetry-bom:$otelVersion"))
implementation "io.opentelemetry:opentelemetry-sdk"
implementation "io.opentelemetry:opentelemetry-exporter-jaeger"
implementation "io.opentelemetry:opentelemetry-extension-trace-propagators"
implementation "io.opentelemetry:opentelemetry-opentracing-shim:$otelVersionAlpha"
implementation "io.opentelemetry:opentelemetry-semconv:$otelVersionAlpha"
implementation 'io.jaegertracing:jaeger-client:1.8.1'
// Used in samples
implementation group: 'commons-configuration', name: 'commons-configuration', version: '1.10'
implementation group: 'io.cloudevents', name: 'cloudevents-core', version: '2.4.1'
implementation group: 'io.cloudevents', name: 'cloudevents-api', version: '2.4.1'
implementation group: 'io.cloudevents', name: 'cloudevents-json-jackson', version: '2.4.1'
implementation group: 'io.serverlessworkflow', name: 'serverlessworkflow-api', version: '4.0.3.Final'
implementation group: 'io.serverlessworkflow', name: 'serverlessworkflow-validation', version: '4.0.3.Final'
implementation group: 'io.serverlessworkflow', name: 'serverlessworkflow-spi', version: '4.0.3.Final'
implementation group: 'io.serverlessworkflow', name: 'serverlessworkflow-util', version: '4.0.3.Final'
implementation group: 'net.thisptr', name: 'jackson-jq', version: '1.0.0-preview.20220705'
// we don't update it to 2.1.0 because 2.1.0 requires Java 11
implementation 'com.codingrodent:jackson-json-crypto:1.1.0'
testImplementation "junit:junit:4.13.2"
testImplementation "org.mockito:mockito-core:5.1.1"
testImplementation(platform("org.junit:junit-bom:5.9.2"))
testImplementation "org.junit.jupiter:junit-jupiter-api"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine"
dependencies {
errorproneJavac('com.google.errorprone:javac:9+181-r4173-1')
if (JavaVersion.current().isJava11Compatible()) {
errorprone('com.google.errorprone:error_prone_core:2.18.0')
} else {
errorprone('com.google.errorprone:error_prone_core:2.18.0')
}
}
}
task execute(type: JavaExec) {
mainClass = findProperty("mainClass") ?: ""
classpath = sourceSets.main.runtimeClasspath
}
test {
useJUnitPlatform()
}
license {
header rootProject.file('license-header.txt')
exclude '**/*.json'
exclude '**/*.yml'
}
if (JavaVersion.current().isJava11Compatible()) {
// Code should be formatted using the latest googleJavaFormat, but it doesn't support Java <11 since version 1.8
apply plugin: 'com.diffplug.spotless'
spotless {
java {
target 'src/*/java/**/*.java'
targetExclude '**/.idea/**'
googleJavaFormat('1.16.0')
}
}
compileJava.dependsOn 'spotlessApply'
}