-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
167 lines (144 loc) · 7.6 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
plugins {
id 'idea'
id 'jacoco'
id 'java-library'
id 'maven-publish'
id 'com.diffplug.spotless' version '6.16.0'
id 'com.github.spotbugs' version '5.0.13'
id 'com.github.ben-manes.versions' version '0.42.0'
id 'com.jfrog.artifactory' version '4.28.2'
id 'org.sonarqube' version '4.0.0.2929'
// [dd 2021-05-17] Use of Spring dependency management generates invalid POM, making
// it impossible to publish to mavenLocal. In order to make TCL testable, I have
// removed this plugin and filled in specific version numbers. I also removed all
// version numbers with `+` in them. Was:
// id 'io.spring.dependency-management' version '1.0.10.RELEASE'
id 'org.springframework.boot' version '3.1.2'
id 'ru.vyarus.quality' version '4.8.0'
}
group = gradle.projectGroup
project.ext {
isCiServer = System.getenv().containsKey("CI")
}
// If true, search local repository (~/.m2/repository/) first for dependencies.
def useMavenLocal = false
repositories {
if (useMavenLocal) {
mavenLocal() // must be listed first to take effect
}
mavenCentral()
maven {
url 'https://broadinstitute.jfrog.io/broadinstitute/libs-release-local/'
}
maven {
url 'https://broadinstitute.jfrog.io/broadinstitute/libs-snapshot-local/'
}
}
dependencies {
// Common utils
implementation group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.9.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
implementation group: 'org.apache.commons', name: 'commons-pool2', version: '2.11.1'
implementation group: 'org.hashids', name: 'hashids', version: '1.0.3'
// JSON processing
testImplementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.7.0'
// Spring
implementation group: 'org.springframework', name: 'spring-context', version: '6.0.11'
implementation group: 'org.springframework', name: 'spring-core', version: '6.0.11'
implementation group: 'org.springframework.retry', name: 'spring-retry', version: '1.3.3'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jdbc', version: '3.1.2'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '3.1.2'
annotationProcessor group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: '3.1.2'
// Misc. Services
implementation group: 'io.kubernetes', name: 'client-java', version: '16.0.0'
implementation group: 'io.prometheus', name: 'simpleclient_httpserver', version: '0.16.0'
implementation group: 'jakarta.ws.rs', name: 'jakarta.ws.rs-api', version: '3.0.0'
// Google dependencies
constraints {
// "-jre" for Java 8 or higher
implementation group: 'com.google.guava', name: 'guava', version: '31.1-jre'
}
// use common bom
implementation platform('com.google.cloud:libraries-bom:26.0.0')
implementation group: 'com.google.cloud', name: 'google-cloud-core'
implementation group: 'com.google.cloud', name: 'google-cloud-pubsub'
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.21.10'
api group: 'com.google.guava', name: 'guava'
// Database
implementation group: 'org.liquibase', name: 'liquibase-core', version: '4.16.0'
runtimeOnly group: 'org.postgresql', name: 'postgresql', version: '42.5.0'
// Terra libraries
implementation group: 'org.broadinstitute.dsde.workbench', name: 'sam-client_2.13', version: '0.1-5281c21'
api group: 'bio.terra', name: 'stairway-gcp', version: '0.0.76-SNAPSHOT'
// Logging
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
implementation group: 'com.google.apis', name: 'google-api-services-logging', version: 'v2-rev20220714-1.32.1'
implementation group: 'ch.qos.logback.contrib', name: 'logback-json-classic', version: '0.1.5'
implementation group: 'ch.qos.logback.contrib', name: 'logback-jackson', version: '0.1.5'
implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.4.14'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.14'
// Flagsmith
implementation group: 'com.flagsmith', name: 'flagsmith-java-client', version: '6.1.0'
// OpenTelemetry
var openTelemetryVersion = '1.31.0'
implementation "io.opentelemetry:opentelemetry-api:${openTelemetryVersion}"
implementation "io.opentelemetry:opentelemetry-sdk:${openTelemetryVersion}"
implementation "io.opentelemetry:opentelemetry-sdk-metrics:${openTelemetryVersion}"
implementation "io.opentelemetry:opentelemetry-exporter-logging:${openTelemetryVersion}"
implementation "io.opentelemetry.semconv:opentelemetry-semconv:1.21.0-alpha"
implementation "io.opentelemetry.instrumentation:opentelemetry-spring-webmvc-6.0:${openTelemetryVersion}-alpha"
implementation "io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:${openTelemetryVersion}"
implementation "io.opentelemetry.instrumentation:opentelemetry-spring-boot:${openTelemetryVersion}-alpha"
implementation "io.opentelemetry:opentelemetry-exporter-prometheus:${openTelemetryVersion}-alpha"
// Google cloud open telemetry exporters
var gcpOpenTelemetryExporterVersion = '0.25.2'
implementation "com.google.cloud.opentelemetry:exporter-trace:${gcpOpenTelemetryExporterVersion}"
implementation "com.google.cloud.opentelemetry:exporter-metrics:${gcpOpenTelemetryExporterVersion}"
// these are required for tracing in tests
testImplementation 'org.springframework:spring-aop:6.0.11'
testImplementation 'org.springframework:spring-aspects:6.0.11'
// Spotbugs
implementation group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '4.7.2'
// Testing
testImplementation('org.springframework.boot:spring-boot-starter-test:3.1.2') {
exclude group: 'com.vaadin.external.google', module: 'android-json'
}
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.9.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.9.0'
testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '2.2'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.8.0'
testImplementation group: 'org.openapitools', name: 'jackson-databind-nullable', version: '0.2.3'
testImplementation 'org.awaitility:awaitility:4.2.0'
// Transitive dependency constraints due to security vulnerabilities in prior versions.
// These are not directly included, they are just constrained if they are pulled in as
// transitive dependencies.
constraints {
implementation('org.scala-lang:scala-library:2.13.10')
implementation('org.json:json:20230227')
implementation('org.bitbucket.b_c:jose4j:0.9.3')
implementation('io.grpc:grpc-xds:1.53.0')
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
// for scans
if (hasProperty('buildScan')) {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
}
def gradleIncDir = "$rootDir/gradle"
apply from: "$gradleIncDir/application.gradle"
apply from: "$gradleIncDir/dependency-locking.gradle"
apply from: "$gradleIncDir/jacoco.gradle"
apply from: "$gradleIncDir/javadoc.gradle"
apply from: "$gradleIncDir/publishing.gradle"
apply from: "$gradleIncDir/quality.gradle"
apply from: "$gradleIncDir/sonarqube.gradle"
apply from: "$gradleIncDir/spotbugs.gradle"
apply from: "$gradleIncDir/spotless.gradle"
apply from: "$gradleIncDir/testing.gradle"