-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
67 lines (61 loc) · 1.55 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
plugins {
id "java"
alias libs.plugins.sonar
alias libs.plugins.spotless
id "au.com.dius.pact" version "4.6.5"
}
sonar {
properties {
property "sonar.projectKey", "ipv-core-back"
property "sonar.organization", "govuk-one-login"
property "sonar.host.url", "https://sonarcloud.io"
}
}
spotless {
java {
target "**/src/**/*.java"
googleJavaFormat("1.13.0").aosp()
importOrder "", "javax", "java", "\\#"
endWithNewline()
toggleOffOn()
}
groovyGradle {
target '**/*.gradle'
greclipse()
trimTrailingWhitespace()
endWithNewline()
}
}
subprojects {
task allDeps(type: DependencyReportTask) {}
configurations.all {
exclude group: 'software.amazon.awssdk', module: 'apache-client'
}
tasks.withType(Test) {
// Configures environment variables to avoid errors in AWS X-Ray and EMF loggers
environment "LAMBDA_TASK_ROOT", "handler"
environment 'AWS_EMF_ENVIRONMENT', 'Local'
environment 'AWS_XRAY_CONTEXT_MISSING', 'IGNORE_ERROR'
}
}
allprojects {
plugins.withType(JavaPlugin).whenPluginAdded {
dependencies {
constraints {
implementation("com.amazonaws:aws-xray-recorder-sdk-aws-sdk-v2:2.18.2") {
because "older versions are incompatible with Jackson > 2.15"
}
}
}
}
}
pact {
publish {
pactDirectory = "$rootDir/build/pacts"
pactBrokerUrl = "${System.env.PACT_URL}?testSource=${System.env.PACT_BROKER_SOURCE_SECRET_DEV}"
pactBrokerUsername = "${System.env.PACT_USER}"
pactBrokerPassword = "${System.env.PACT_PASSWORD}"
consumerVersion = "${System.env.GIT_SHA}"
consumerBranch = "${System.env.GIT_BRANCH}"
}
}