-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathbuild.gradle
138 lines (109 loc) · 4.49 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
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) {
testClassesDirs = sourceSets.jarFileTest.output.classesDirs
classpath = sourceSets.jarFileTest.runtimeClasspath
file(shadowJar.outputs.files.singleFile) // input for correct caching
systemProperty("jarFile", shadowJar.outputs.files.singleFile)
dependsOn(shadowJar)
}
project.tasks.check.dependsOn(jarFileTest)
tasks.japicmp {
packageExcludes = [
"com.github.dockerjava.*",
"org.testcontainers.shaded.*",
]
classExcludes = [
"org.testcontainers.utility.RyukResourceReaper",
]
methodExcludes = [
"org.testcontainers.containers.Container#getDockerClient()",
"org.testcontainers.containers.ContainerState#getDockerClient()",
"org.testcontainers.containers.ContainerState#execInContainer(org.testcontainers.containers.ExecConfig)",
"org.testcontainers.containers.ContainerState#execInContainer(java.nio.charset.Charset,org.testcontainers.containers.ExecConfig)"
]
fieldExcludes = []
}
configurations.all {
resolutionStrategy {
// use lower Jackson version
force 'com.fasterxml.jackson.core:jackson-databind:2.8.8'
force 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.8.8'
}
}
dependencies {
api 'junit:junit:4.13.2'
api 'org.slf4j:slf4j-api:1.7.36'
compileOnly 'org.jetbrains:annotations:24.1.0'
testCompileOnly 'org.jetbrains:annotations:24.1.0'
api 'org.apache.commons:commons-compress:1.24.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.23.0') {
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.2.0'
api platform('com.github.docker-java:docker-java-bom:3.4.1')
shaded platform('com.github.docker-java:docker-java-bom:3.4.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:1.33"
shaded 'org.glassfish.main.external:trilead-ssh2-repackaged:4.1.2'
shaded 'org.zeroturnaround:zt-exec:1.12'
testImplementation('com.google.cloud.tools:jib-core:0.23.0') {
exclude group: 'com.google.guava', module: 'guava'
}
testImplementation 'org.apache.httpcomponents:httpclient:4.5.14'
testImplementation 'redis.clients:jedis:5.1.5'
testImplementation 'com.rabbitmq:amqp-client:5.22.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.26.3'
testImplementation 'io.rest-assured:rest-assured:5.5.0'
jarFileTestCompileOnly "org.projectlombok:lombok:${lombok.version}"
jarFileTestAnnotationProcessor "org.projectlombok:lombok:${lombok.version}"
jarFileTestImplementation 'junit:junit:4.13.2'
jarFileTestImplementation 'org.assertj:assertj-core:3.26.3'
jarFileTestImplementation 'org.ow2.asm:asm-debug-all:5.2'
}
tasks.generatePomFileForMavenJavaPublication.finalizedBy(
tasks.register('checkPOMdependencies', org.testcontainers.build.ComparePOMWithLatestReleasedTask) {
ignore = [
]
}
)