-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathbuild.gradle
More file actions
90 lines (83 loc) · 3.21 KB
/
Copy pathbuild.gradle
File metadata and controls
90 lines (83 loc) · 3.21 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
import org.cloudfoundry.credhub.gradlebuild.DependenciesGraphPlugin
buildscript {
ext {
asciiDoctorConvertPluginVersion = '4.0.5'
bcpkixFipsVersion = '2.1.11'
bcFipsVersion = '2.1.2'
guavaVersion = '33.6.0-jre'
kotlinVersion = '2.4.0'
passayVersion = '2.0.0'
springBootVersion = '4.1.0'
mariadbJdbcVersion = '2.7.14' // Bumping to v3 breaks some pipeline jobs, so pinning to v2 for now. v2 (current version) is stable and will be supported until about September 2025 (https://mariadb.com/kb/en/about-mariadb-connector-j/).
grpcVersion = '1.82.1'
protobufVersion = '4.35.1'
}
repositories {
def artifactRepoUrl = System.getenv("ARTIFACTORY_URL")
if (artifactRepoUrl != null) {
maven {
url artifactRepoUrl
credentials {
username = System.getenv("ARTIFACTORY_USER")
password = System.getenv("ARTIFACTORY_PASS")
}
}
}
else {
mavenCentral()
maven { url = "https://plugins.gradle.org/m2/" }
}
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath("org.owasp:dependency-check-gradle:12.2.2")
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
}
}
plugins {
id 'com.github.ben-manes.versions' version '0.54.0'
}
apply plugin: DependenciesGraphPlugin
apply plugin: "org.owasp.dependencycheck"
dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}
subprojects {
configurations {
ktlint
}
dependencies {
ktlint "com.pinterest.ktlint:ktlint-cli:1.8.0"
}
plugins.withType(JavaPlugin) {
dependencies {
implementation("org.yaml:snakeyaml")
implementation("com.h2database:h2")
implementation("com.google.guava:guava:${guavaVersion}")
testImplementation("org.mockito:mockito-core")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.withType(Test) {
useJUnitPlatform()
// Apply a default per-test-method timeout to every test that doesn't already have
// @Timeout. This converts a silent hang into a FAILED test with a stack trace,
// regardless of which database profile is active. Tests that legitimately need longer
// must declare an explicit @Timeout(N) annotation.
systemProperty 'junit.jupiter.execution.timeout.default', '60 s'
}
}
}
// Override spring boot's version dependencies
ext['kotlin.version'] = "${kotlinVersion}"
ext['protobuf-java.version'] = "${protobufVersion}"
assert JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_25)