Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
187 lines (146 loc) · 5.93 KB
/
Copy pathbuild.gradle
File metadata and controls
187 lines (146 loc) · 5.93 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
buildscript {
repositories {
jcenter()
}
dependencies {
// https://github.com/melix/japicmp-gradle-plugin/issues/36
classpath 'com.google.guava:guava:28.2-jre'
}
}
plugins {
id 'me.champeau.gradle.japicmp' version '0.2.8'
}
apply plugin: 'com.github.johnrengelman.shadow'
description = "Testcontainers Core"
sourceSets {
jarFileTest
}
idea.module.testSourceDirs += sourceSets.jarFileTest.allSource.srcDirs
configurations {
baseline
shaded
[runtime, compileOnly, testCompile]*.extendsFrom shaded
}
shadowJar {
configurations = [project.configurations.shaded]
mergeServiceFiles()
exclude 'org/newsclub/**'
[
'META-INF/NOTICE',
'META-INF/NOTICE.txt',
'META-INF/LICENSE',
'META-INF/LICENSE.txt',
'META-INF/DEPENDENCIES',
'META-INF/maven/',
'META-INF/proguard/',
'META-INF/services/README.md',
'META-INF/services/com.fasterxml.jackson.core.*',
'META-INF/services/com.github.dockerjava.api.command.*',
'META-INF/services/javax.ws.rs.ext.*',
'META-INF/services/java.security.Provider',
'mozilla/public-suffix-list.txt',
].each { exclude(it) }
project.afterEvaluate {
dependencies {
for (id in project.configurations.compile.resolvedConfiguration.resolvedArtifacts*.moduleVersion*.id) {
exclude(dependency("${id.group}:${id.name}"))
}
}
}
}
task jarFileTest(type: Test) {
testClassesDirs = sourceSets.jarFileTest.output.classesDirs
classpath = sourceSets.jarFileTest.runtimeClasspath
systemProperty("jarFile", shadowJar.outputs.files.singleFile)
dependsOn(shadowJar)
}
project.tasks.check.dependsOn(jarFileTest)
task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask) {
dependsOn(tasks.jar)
oldClasspath = configurations.baseline
newClasspath = jar.outputs.files
ignoreMissingClasses = true
accessModifier = "protected"
failOnModification = true
failOnSourceIncompatibility = true
// TODO cleanup excludes after we release the version based on docker-java 3.2.0
packageExcludes = [
"com.github.dockerjava.*",
"org.testcontainers.shaded.*",
]
classExcludes = [
// Changed to a non-deprecated `ResultCallbackTemplate` from docker-java-api instead of docker-java-core
"org.testcontainers.containers.output.FrameConsumerResultCallback",
"org.testcontainers.dockerclient.LogToStringContainerCallback",
// Deprecated, shouldn't be public
"org.testcontainers.dockerclient.AuditLoggingDockerClient",
"org.testcontainers.dockerclient.auth.AuthDelegatingDockerClientConfig",
// Deprecated docker-java-core class, should go to docker-java
"org.testcontainers.dockerclient.transport.okhttp.OkHttpDockerCmdExecFactory",
// Exposed `com.github.dockerjava.core.command.PullImageResultCallback` to the public API
"org.testcontainers.images.TimeLimitedLoggedPullImageResultCallback",
]
methodExcludes = [
// Was returning a type from "com.github.dockerjava.core.*" package
"org.testcontainers.dockerclient.*ClientProviderStrategy#tryConfiguration(java.lang.String)",
]
onlyBinaryIncompatibleModified = true
htmlOutputFile = file("$buildDir/reports/japi.html")
}
project.tasks.check.dependsOn(japicmp)
dependencies {
baseline 'org.testcontainers:testcontainers:1.12.5', {
exclude group: "*", module: "*"
}
compile 'junit:junit:4.12'
compile 'org.slf4j:slf4j-api:1.7.30'
compile 'org.jetbrains:annotations:17.0.0'
compile 'javax.annotation:javax.annotation-api:1.3.2'
compile 'org.apache.commons:commons-compress:1.19'
// Added for JDK9 compatibility since it's missing this package
compile 'javax.xml.bind:jaxb-api:2.3.1'
compile ('org.rnorth.duct-tape:duct-tape:1.0.8') {
exclude(group: 'org.jetbrains', module: 'annotations')
}
compile ('org.rnorth.visible-assertions:visible-assertions:2.1.2') {
// Excluded in favor of jna-platform below
exclude(group: "net.java.dev.jna", module: "jna")
}
compile ('org.rnorth:tcp-unix-socket-proxy:1.0.2') {
exclude(group: "log4j", module: "log4j")
}
compile "net.java.dev.jna:jna-platform:5.5.0"
shaded ('org.scala-sbt.ipcsocket:ipcsocket:1.0.0') {
exclude(group: "net.java.dev.jna")
}
compile 'com.github.docker-java:docker-java-api:3.2.0-rc4'
shaded ('com.github.docker-java:docker-java-transport-okhttp:3.2.0-rc4') {
exclude(group: 'com.google.code.findbug')
exclude(group: 'org.slf4j')
exclude(group: 'org.apache.commons', module: 'commons-compress')
exclude(group: 'com.github.docker-java', module: 'docker-java-api')
exclude(group: 'com.fasterxml.jackson.core', module: 'jackson-annotations')
}
shaded "org.yaml:snakeyaml:1.25"
shaded 'com.squareup.okhttp3:okhttp:3.14.4'
shaded 'org.glassfish.main.external:trilead-ssh2-repackaged:4.1.2'
shaded 'org.zeroturnaround:zt-exec:1.10', {
exclude(group: 'org.slf4j')
}
testCompile 'org.apache.httpcomponents:httpclient:4.5.9'
testCompile 'redis.clients:jedis:3.2.0'
testCompile 'com.rabbitmq:amqp-client:5.8.0'
testCompile 'org.mongodb:mongo-java-driver:3.12.1'
testCompile ('org.mockito:mockito-core:3.2.4') {
exclude(module: 'hamcrest-core')
}
// Synthetic JAR used for MountableFileTest and DirectoryTarResourceTest
testCompile files('testlib/repo/fakejar/fakejar/0/fakejar-0.jar')
testCompile 'org.assertj:assertj-core:3.15.0'
testCompile project(':test-support')
jarFileTestCompileOnly "org.projectlombok:lombok:${lombok.version}"
jarFileTestAnnotationProcessor "org.projectlombok:lombok:${lombok.version}"
jarFileTestCompile 'junit:junit:4.12'
jarFileTestCompile 'org.assertj:assertj-core:3.14.0'
jarFileTestCompile 'org.ow2.asm:asm-debug-all:5.2'
}