-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathbuild.gradle
More file actions
145 lines (113 loc) · 4.48 KB
/
build.gradle
File metadata and controls
145 lines (113 loc) · 4.48 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
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
apply plugin: 'com.gradleup.shadow'
description = "Testcontainers Core"
sourceSets {
jarFileTest
}
test.maxParallelForks = 4
idea.module.testSourceDirs += sourceSets.jarFileTest.allSource.srcDirs
jar {
manifest {
attributes('Implementation-Version': project.getProperty("version"))
}
}
shadowJar {
[
'META-INF/NOTICE',
'META-INF/NOTICE.txt',
'META-INF/LICENSE',
'META-INF/LICENSE.txt',
'META-INF/maven/',
'META-INF/proguard/',
'META-INF/versions/*/module-info.class',
'META-INF/services/java.security.Provider',
].each { exclude(it) }
}
task jarFileTest(type: Test) {
useJUnitPlatform()
testClassesDirs = sourceSets.jarFileTest.output.classesDirs
classpath = sourceSets.jarFileTest.runtimeClasspath
inputs.files(shadowJar).withPathSensitivity(PathSensitivity.RELATIVE)
systemProperty("jarFile", project.projectDir.toPath().relativize(shadowJar.outputs.files.singleFile.toPath()).toString())
dependsOn(shadowJar)
}
project.tasks.check.dependsOn(jarFileTest)
tasks.japicmp {
packageExcludes = [
"com.github.dockerjava.*",
"org.testcontainers.shaded.*",
]
classExcludes = []
methodExcludes = []
fieldExcludes = []
}
configurations.all {
resolutionStrategy {
force 'com.fasterxml.jackson.core:jackson-databind:2.18.4'
force 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.4'
}
}
dependencies {
api 'org.slf4j:slf4j-api:1.7.36'
compileOnly 'org.jetbrains:annotations:26.0.2-1'
testCompileOnly 'org.jetbrains:annotations:26.0.2-1'
api 'org.apache.commons:commons-compress:1.28.0'
api ('org.rnorth.duct-tape:duct-tape:1.0.8') {
exclude(group: 'org.jetbrains', module: 'annotations')
}
provided('com.google.cloud.tools:jib-core:0.27.3') {
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'com.fasterxml.jackson.datatype', module: 'jackson-datatype-jsr310'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
exclude group: 'org.apache.commons', module: 'commons-compress'
}
shaded 'org.awaitility:awaitility:4.3.0'
api platform('com.github.docker-java:docker-java-bom:3.7.1')
shaded platform('com.github.docker-java:docker-java-bom:3.7.1')
api "com.github.docker-java:docker-java-api"
shaded('com.github.docker-java:docker-java-core') {
exclude group: 'com.google.guava', module: 'guava'
}
api 'com.github.docker-java:docker-java-transport-zerodep'
shaded 'com.google.guava:guava:33.3.1-jre'
shaded "org.yaml:snakeyaml:2.5"
shaded 'org.glassfish.main.external:trilead-ssh2-repackaged:4.1.2'
shaded 'org.zeroturnaround:zt-exec:1.12'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4'
testImplementation('com.google.cloud.tools:jib-core:0.27.3') {
exclude group: 'com.google.guava', module: 'guava'
}
testImplementation 'org.apache.httpcomponents:httpclient:4.5.14'
testImplementation 'redis.clients:jedis:6.2.0'
testImplementation 'com.rabbitmq:amqp-client:5.26.0'
testImplementation 'org.mongodb:mongo-java-driver:3.12.14'
testImplementation ('org.mockito:mockito-core:4.11.0') {
exclude(module: 'hamcrest-core')
}
// Synthetic JAR used for MountableFileTest and DirectoryTarResourceTest
testImplementation files('testlib/repo/fakejar/fakejar/0/fakejar-0.jar')
testImplementation 'org.assertj:assertj-core:3.27.7'
testImplementation 'io.rest-assured:rest-assured:5.5.7'
jarFileTestCompileOnly "org.projectlombok:lombok:${lombok.version}"
jarFileTestAnnotationProcessor "org.projectlombok:lombok:${lombok.version}"
jarFileTestRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.0'
jarFileTestImplementation 'org.junit.jupiter:junit-jupiter:5.13.4'
jarFileTestImplementation 'org.assertj:assertj-core:3.27.7'
jarFileTestImplementation 'org.ow2.asm:asm-debug-all:5.2'
}
tasks.generatePomFileForMavenJavaPublication.finalizedBy(
tasks.register('checkPOMdependencies', org.testcontainers.build.ComparePOMWithLatestReleasedTask) {
ignore = [
]
}
)
compileTestJava {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(17)
}
options.release.set(17)
}
test {
useJUnitPlatform()
}