-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
141 lines (123 loc) · 5.97 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
// Build Script Classpath
buildscript {
ext {
springBootVersion = '3.3.5'
}
dependencies {
// jib build requires this dependency;
// see https://github.com/GoogleContainerTools/jib/issues/4235
classpath group: 'org.apache.commons', name: 'commons-compress', version: '1.27.1'
}
}
plugins {
id 'idea'
id 'jacoco'
id 'java'
id 'com.diffplug.spotless' version '6.25.0'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'com.google.cloud.tools.jib' version '3.4.4'
id 'de.undercouch.download' version '5.6.0'
id 'org.hidetake.swagger.generator' version '2.19.2'
id 'org.sonarqube' version '5.1.0.4882'
id 'org.springframework.boot' version "${springBootVersion}"
id 'com.srcclr.gradle' version '3.1.12'
}
sourceCompatibility = JavaVersion.VERSION_17
// If true, search local repository (~/.m2/repository/) first for dependencies.
def useMavenLocal = false
allprojects {
group = gradle.projectGroup
version = gradle.rbsVersion
ext {
artifactGroup = "${group}.buffer"
swaggerOutputDir = "${buildDir}/generated"
resourceDir = "${rootDir}/src/main/resources"
isCiServer = System.getenv().containsKey("CI")
}
apply plugin: 'idea'
idea {
module {
generatedSourceDirs = [file("${swaggerOutputDir}/src/main/java")]
downloadJavadoc = true
}
}
}
repositories {
if (useMavenLocal) {
mavenLocal() // must be listed first to take effect
}
mavenCentral()
maven {
url 'https://broadinstitute.jfrog.io/broadinstitute/libs-release/'
}
maven {
url 'https://broadinstitute.jfrog.io/broadinstitute/libs-snapshot-local/'
}
}
dependencies {
// Terra deps - we get Stairway via TCL
implementation group: 'bio.terra', name: 'terra-common-lib', version: '1.1.20-SNAPSHOT'
implementation group: 'bio.terra', name: 'terra-cloud-resource-lib', version: '1.2.31-SNAPSHOT'
implementation group: 'bio.terra', name: 'terra-resource-janitor-client', version: '0.113.38-SNAPSHOT'
// Versioned direct deps
implementation group: 'net.javacrumbs.shedlock', name: 'shedlock-spring', version: '5.16.0'
implementation group: 'net.javacrumbs.shedlock', name: 'shedlock-provider-jdbc-template', version: '5.16.0'
implementation group: 'com.google.auto.value', name: 'auto-value-annotations', version: '1.11.0'
implementation group: 'com.google.cloud', name: 'google-cloud-pubsub', version: '1.134.1'
implementation group: 'com.google.guava', name: 'guava', version: '33.3.1-jre'
implementation group: 'jakarta.validation', name: 'jakarta.validation-api', version: '3.1.0'
implementation group: 'org.liquibase', name: 'liquibase-core', version: '4.30.0'
implementation group: 'org.webjars', name: 'webjars-locator-core', version: '0.59'
runtimeOnly group: 'org.postgresql', name: 'postgresql'
// Google cloud open telemetry exporters
var gcpOpenTelemetryExporterVersion = '0.33.0'
implementation "com.google.cloud.opentelemetry:exporter-trace:${gcpOpenTelemetryExporterVersion}"
implementation "com.google.cloud.opentelemetry:exporter-metrics:${gcpOpenTelemetryExporterVersion}"
// Deps whose versions are controlled by Spring
implementation group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.12.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0'
implementation group: 'org.apache.commons', name: 'commons-pool2', version: '2.12.0'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jdbc', version: "${springBootVersion}"
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: "${springBootVersion}"
implementation group: 'org.springframework.retry', name: 'spring-retry', version: '2.0.10'
// Swagger deps
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.18.1'
implementation group: 'io.swagger', name: 'swagger-annotations', version: '1.6.14'
implementation group: 'io.swagger.core.v3', name: 'swagger-annotations', version: '2.2.25'
runtimeOnly group: 'org.webjars.npm', name: 'swagger-ui-dist', version: '5.18.2'
swaggerCodegen group: 'io.swagger.codegen.v3', name: 'swagger-codegen-cli', version: '3.0.61'
// Test deps
testImplementation 'org.awaitility:awaitility:4.2.2'
testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
annotationProcessor group: 'com.google.auto.value', name: 'auto-value', version: '1.11.0'
annotationProcessor group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: "${springBootVersion}"
// Transitive dependency constraints due to security vulnurabilities in prior versions.
// These are not directly included, they are just constrained if they are pulled in as
// transitive dependencies.
constraints {
implementation('org.yaml:snakeyaml:2.3')
implementation('com.nimbusds:nimbus-jose-jwt:9.46')
implementation('io.projectreactor.netty:reactor-netty-http:1.1.23')
implementation('com.fasterxml.jackson:jackson-bom:2.18.1')
}
}
// for scans
if (hasProperty('buildScan')) {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
}
def gradleIncDir= "$rootDir/gradle"
apply from: "$gradleIncDir/jacoco.gradle"
apply from: "$gradleIncDir/javadoc.gradle"
apply from: "$gradleIncDir/jib.gradle"
apply from: "$gradleIncDir/sonarqube.gradle"
apply from: "$gradleIncDir/spotless.gradle"
apply from: "$gradleIncDir/swagger-server.gradle"
apply from: "$gradleIncDir/testing.gradle"
apply from: "$gradleIncDir/srcclr.gradle"
sourceSets.main.java.srcDir "${swaggerOutputDir}/src/main/java"
sourceSets.test.resources.srcDir 'config/' // Allow unit tests to directly load config files.