forked from testcontainers/testcontainers-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
126 lines (101 loc) · 4.02 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
apply plugin: 'com.github.johnrengelman.shadow'
description = "Testcontainers Core"
sourceSets {
jarFileTest
}
idea.module.testSourceDirs += sourceSets.jarFileTest.allSource.srcDirs
configurations {
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)
dependencies {
compile 'junit:junit:4.12'
compile 'org.slf4j:slf4j-api:1.7.28'
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")
}
shaded ('com.github.docker-java:docker-java:3.1.5') {
exclude(group: 'org.glassfish.jersey.core')
exclude(group: 'org.glassfish.jersey.connectors')
exclude(group: 'org.glassfish.jersey.inject')
exclude(group: 'log4j')
exclude(group: 'com.google.code.findbug')
exclude(group: 'com.kohlschutter.junixsocket')
exclude(group: 'io.netty')
exclude(group: 'org.apache.httpcomponents')
exclude(group: 'org.slf4j')
exclude(group: 'org.apache.commons', module: 'commons-compress')
}
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.1.0'
testCompile 'com.rabbitmq:amqp-client:5.7.3'
testCompile 'org.mongodb:mongo-java-driver:3.11.1'
testCompile ('org.mockito:mockito-core:3.1.0') {
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.14.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'
}