-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
113 lines (89 loc) · 3.84 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
// docker-junit-rule
buildscript {
repositories {
jcenter()
}
}
plugins {
id 'java'
id 'maven'
id 'signing'
id 'eclipse'
id 'idea'
// keep dependencies up-to-date!
id 'com.github.ben-manes.versions' version '0.33.0'
// useful for creating immutable java beans
id 'org.inferred.processors' version '3.3.0'
// to ensure clean code
id "net.ltgt.errorprone" version "1.3.0"
// for deployment to Maven Central
id "io.codearte.nexus-staging" version "0.22.0"
// for building fat jar
id "com.github.johnrengelman.shadow" version "5.2.0"
// useful utilities
id "com.arakelian.multitool" version "3.2.0"
}
group = 'com.arakelian'
wrapper {
gradleVersion = '6.6.1'
}
shadowJar {
dependencies {
exclude(dependency('org.slf4j:slf4j-api:.*'))
}
}
multitool {
relocates += [
'com.github.dockerjava' : 'repackaged.com.arakelian.docker.junit.com.github.dockerjava',
'okhttp3' : 'repackaged.com.arakelian.docker.junit.okhttp3',
'okio' : 'repackaged.com.arakelian.docker.junit.okio',
'com.google.common' : 'repackaged.com.arakelian.docker.junit.${prefix}com.google.common',
'javax.annotation' : 'repackaged.com.arakelian.docker.junit.${prefix}javax.annotation',
'org.apache.commons' : 'repackaged.com.arakelian.docker.junit.${prefix}org.apache.commons',
'com.fasterxml.jackson' : 'repackaged.com.arakelian.docker.junit.${prefix}com.fasterxml.jackson',
'org.bouncycastle' : 'repackaged.com.arakelian.docker.junit.${prefix}org.bouncycastle',
]
configureMinify = true
proguardConfiguration {
keep includedescriptorclasses:true, 'class com.arakelian.** { *; }'
keep includedescriptorclasses:true, 'class repackaged.com.arakelian.docker.junit.com.github.dockerjava.** { *; }'
keep includedescriptorclasses:true, 'class repackaged.com.arakelian.docker.junit.okhttp3.** { *; }'
keep includedescriptorclasses:true, 'class repackaged.com.arakelian.docker.junit.okio.** { *; }'
keep includedescriptorclasses:true, 'class com.sun.jna.** { *; }'
dontwarn 'repackaged.com.arakelian.docker.junit.**'
dontwarn 'org.slf4j.**'
dontwarn 'com.github.dockerjava.**'
dontwarn 'org.apache.logging.log4j.**'
dontwarn 'com.sun.jna.**'
dontwarn 'sun.misc.**'
}
}
dependencies {
processor 'org.immutables:value:2.8.8'
// annotations
compile 'org.immutables:value-annotations:2.8.8'
// configure errorprone version
errorprone 'com.google.errorprone:error_prone_core:2.5.1'
// we expose a JUnit rule so obviously JUnit is a runtime requirement
provided 'junit:junit:4.13.1'
// we shadow Guava due to frequent downstream compatibility issues
shadow 'com.google.guava:guava:29.0-jre'
// shadow because we use very few classes from here and don't want to create
// unnecessary downstream dependencies
shadow 'org.apache.commons:commons-lang3:3.11'
// easy-to-use library for communicating with Docker host; we shadow the library
// to avoid downstream compatibility issues
shadow 'com.github.docker-java:docker-java-api:3.2.5'
shadow 'com.github.docker-java:docker-java-core:3.2.5'
shadow 'com.github.docker-java:docker-java-transport-okhttp:3.2.5'
// logging
testCompile 'org.apache.logging.log4j:log4j-api:2.13.3'
testCompile 'org.apache.logging.log4j:log4j-core:2.13.3'
testCompile 'org.apache.logging.log4j:log4j-slf4j-impl:2.13.3'
testCompile 'org.slf4j:jcl-over-slf4j:1.7.30'
testCompile 'org.slf4j:jul-to-slf4j:1.7.30'
compile 'org.slf4j:slf4j-api:1.7.30'
// for unit testing
testCompile 'com.arakelian:retry:3.9.0'
testCompile 'com.rabbitmq:amqp-client:5.8.0'
}