forked from testcontainers/testcontainers-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
135 lines (112 loc) · 4.73 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
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/io.netty.versions.properties',
'META-INF/NOTICE',
'META-INF/NOTICE.txt',
'META-INF/LICENSE',
'META-INF/LICENSE.txt',
'META-INF/DEPENDENCIES',
'META-INF/maven/',
'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/org.glassfish.hk2.extension.*',
'META-INF/services/org.jvnet.hk2.external.generator.*',
'META-INF/services/org.glassfish.jersey.internal.spi.*',
'META-INF/services/java.security.Provider',
'mozilla/public-suffix-list.txt',
].each { exclude(it) }
dependencies {
include(dependency('org.apache.httpcomponents:.*'))
include(dependency('org.glassfish.*:.*'))
include(dependency('org.aopalliance.*:.*'))
include(dependency('javax.ws.rs:.*'))
include(dependency('com.fasterxml.*:.*'))
include(dependency('com.github.docker-java:.*'))
include(dependency('com.google.guava:.*'))
include(dependency('io.netty:.*'))
include(dependency('org.bouncycastle:.*'))
include(dependency('org.zeroturnaround:zt-exec'))
include(dependency('commons-lang:commons-lang'))
include(dependency('commons-io:commons-io'))
include(dependency('commons-codec:commons-codec'))
include(dependency('com.squareup.okhttp3:.*'))
include(dependency('com.squareup.okio:.*'))
include(dependency('org.scala-sbt.ipcsocket:ipcsocket'))
include(dependency('org.glassfish.main.external:trilead-ssh2-repackaged'))
}
}
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.25'
compile 'org.slf4j:slf4j-ext:1.7.25'
compile 'org.jetbrains:annotations:15.0'
compile 'javax.annotation:javax.annotation-api:1.3.1'
compile 'com.google.code.findbugs:jsr305:3.0.2'
compile 'org.apache.commons:commons-compress:1.16.1'
// Added for JDK9 compatibility since it's missing this package
compile 'javax.xml.bind:jaxb-api:2.3.0'
compile ('org.rnorth.duct-tape:duct-tape:1.0.7') {
exclude(group: 'org.jetbrains', module: 'annotations')
}
compile 'org.rnorth.visible-assertions:visible-assertions:2.1.1'
compile ('org.rnorth:tcp-unix-socket-proxy:1.0.2') {
exclude(group: "log4j", module: "log4j")
}
compile "net.java.dev.jna:jna-platform:4.5.1"
shaded ('org.scala-sbt.ipcsocket:ipcsocket:1.0.0') {
exclude(group: "net.java.dev.jna")
}
shaded ('com.github.docker-java:docker-java:3.1.0-rc-4') {
exclude(group: 'org.glassfish.jersey.core')
exclude(group: 'org.glassfish.jersey.connectors')
exclude(group: 'log4j')
exclude(group: 'com.google.code.findbug')
exclude(group: 'com.kohlschutter.junixsocket')
}
shaded 'com.squareup.okhttp3:okhttp:3.10.0'
shaded 'org.glassfish.main.external:trilead-ssh2-repackaged:4.1.2'
shaded 'javax.ws.rs:javax.ws.rs-api:2.0.1'
shaded 'org.zeroturnaround:zt-exec:1.10'
shaded 'commons-lang:commons-lang:2.6'
shaded 'commons-io:commons-io:2.5'
shaded 'commons-codec:commons-codec:1.11'
// docker-java uses SslConfigurator from jersey-common for TLS
shaded ('org.glassfish.jersey.core:jersey-common:2.23.1') {
// SslConfigurator doesn't use classes from dependencies
exclude(module: '*')
}
testCompile 'redis.clients:jedis:2.8.0'
testCompile 'com.rabbitmq:amqp-client:3.5.3'
testCompile 'org.mongodb:mongo-java-driver:3.0.2'
testCompile ('org.mockito:mockito-core:1.10.19') {
exclude(module: 'hamcrest-core')
}
// Synthetic JAR used for MountableFileTest and DirectoryTarResourceTest
testCompile files('testlib/repo/fakejar/fakejar/0/fakejar-0.jar')
jarFileTestCompileOnly "org.projectlombok:lombok:${lombok.version}"
jarFileTestCompile 'junit:junit:4.12'
jarFileTestCompile 'org.assertj:assertj-core:3.8.0'
jarFileTestCompile 'org.ow2.asm:asm-debug-all:5.2'
}