-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
129 lines (100 loc) · 4.23 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.2'
id 'io.spring.dependency-management' version '1.1.2'
id 'application'
}
group = 'org.squidmin.java.spring.gradle.bigquery'
version = '0.0.1-SNAPSHOT'
println "Build Version = ${version ?: '[none]'}"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
springBoot {
mainClass = 'org.squidmin.java.spring.gradle.bigquery.Java17SpringGradleBigQueryReferenceApplication'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
ext {
set('springCloudGcpVersion', "4.7.2")
set('springCloudVersion', "2022.0.4")
}
dependencies {
developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'org.springframework.cloud:spring-cloud-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.cloud:spring-cloud-context'
// Security
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.github.jknack:handlebars:4.3.1'
implementation 'com.google.cloud:spring-cloud-gcp-starter'
// Google API client
implementation 'com.google.api-client:google-api-client:1.31.1'
// implementation 'com.google.auth:google-auth-library-oauth2-http:1.20.0'
// BigQuery
implementation platform('com.google.cloud:libraries-bom:26.11.0')
implementation 'com.google.cloud:google-cloud-bigquery:2.24.2'
// Google Cloud Storage
implementation 'com.google.cloud:google-cloud-storage:2.1.5'
// JSON parsing library
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
// Lombok
compileOnly 'org.projectlombok:lombok:1.18.28'
annotationProcessor 'org.projectlombok:lombok:1.18.28'
// SnakeYAML
implementation ('org.yaml:snakeyaml') {
version {
strictly "1.33"
}
because "patch CVE-2022-25857 brought in by snakeyaml."
}
testImplementation 'org.springframework:spring-test'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testCompileOnly 'org.projectlombok:lombok:1.18.28'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.28'
}
dependencyManagement {
imports {
mavenBom "com.google.cloud:spring-cloud-gcp-dependencies:${springCloudGcpVersion}"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
tasks.named('test') {
useJUnitPlatform()
systemProperty 'spring.profiles.active', System.getProperty('APP_PROFILE')
systemProperty 'GCP_SA_KEY_PATH', System.getProperty('GCP_SA_KEY_PATH')
systemProperty 'GCP_ACCESS_TOKEN', System.getProperty('GCP_ACCESS_TOKEN')
systemProperty 'GCP_PROJECT_ID', System.getProperty('GCP_PROJECT_ID')
systemProperty 'BQ_DATASET', System.getProperty('BQ_DATASET')
systemProperty 'BQ_TABLE', System.getProperty('BQ_TABLE')
systemProperty 'SCHEMA', System.getProperty('SCHEMA')
exclude '**/BigQueryServiceEndToEndTest.class'
exclude '**/GcsServiceEndToEndTest.class'
exclude '**/ControllerIntegrationTest.class'
testLogging {
showStandardStreams = true
events 'passed', 'skipped', 'failed'
}
}
tasks.named('bootRun') {
systemProperty 'spring.profiles.active', System.getProperty('APP_PROFILE')
systemProperty 'GCP_SA_KEY_PATH', System.getProperty('GCP_SA_KEY_PATH')
systemProperty 'GCP_ACCESS_TOKEN', System.getProperty('GCP_ACCESS_TOKEN')
systemProperty 'GCP_PROJECT_ID', System.getProperty('GCP_PROJECT_ID')
systemProperty 'BQ_DATASET', System.getProperty('BQ_DATASET')
systemProperty 'BQ_TABLE', System.getProperty('BQ_TABLE')
}