-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
126 lines (106 loc) · 5.09 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
plugins {
id 'java'
id 'jacoco'
id 'com.google.cloud.tools.jib' version '3.1.2'
// id "checkstyle"
}
version = "${project_version}" + (isSnapshot() ? '.' + getBuildNumber() : '')
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation project('Confluencia')
implementation group: 'com.diluv.schoomp', name: 'Schoomp', version: '1.2.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.14.1'
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
implementation group: 'commons-validator', name: 'commons-validator', version: '1.7'
implementation group: 'org.sejda.imageio', name: 'webp-imageio', version: '0.1.6'
implementation group: 'com.nimbusds', name: 'nimbus-jose-jwt', version: '9.11.3'
implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.7'
implementation group: 'com.warrenstrange', name: 'googleauth', version: '1.5.0'
implementation group: 'com.github.slugify', name: 'slugify', version: '2.5'
implementation group: 'com.wildbit.java', name: 'postmark', version: '1.7.4'
implementation group: "com.github.spotbugs", name: "spotbugs-annotations", version: "4.3.0"
implementation group: 'com.graphql-java-kickstart', name: 'graphql-java-tools', version: '11.0.1'
implementation group: 'com.graphql-java', name: 'graphql-java', version: '17.0'
implementation group: 'com.graphql-java', name: 'graphql-java-extended-scalars', version: '17.0'
implementation group: 'org.jboss.resteasy', name: 'resteasy-undertow', version: '4.7.1.Final'
implementation group: 'org.jboss.resteasy', name: 'resteasy-multipart-provider', version: '4.7.1.Final'
implementation group: 'org.jboss.resteasy', name: 'resteasy-atom-provider', version: '4.7.1.Final'
implementation group: 'org.jboss.resteasy', name: 'resteasy-cdi', version: '4.7.1.Final'
implementation group: 'org.jboss.resteasy', name: 'resteasy-validator-provider', version: '4.7.1.Final'
implementation group: 'org.hibernate.validator', name: 'hibernate-validator', version: '6.2.0.Final'
implementation group: 'org.glassfish', name: 'javax.el', version: '3.0.0'
implementation group: 'org.jboss.weld.servlet', name: 'weld-servlet', version: '2.4.8.Final'
compileOnly group: 'org.hibernate', name: 'hibernate-core', version: '5.5.6.Final'
testImplementation project(path: ':Confluencia', configuration: 'testOutput')
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.7.2'
testImplementation group: 'io.rest-assured', name: 'rest-assured', version: '4.4.0'
testImplementation group: 'com.networknt', name: 'json-schema-validator', version: '1.0.57'
testImplementation group: 'org.testcontainers', name: 'testcontainers', version: '1.16.0'
testImplementation group: 'org.testcontainers', name: 'mariadb', version: '1.16.0'
testImplementation group: 'org.testcontainers', name: 'junit-jupiter', version: '1.16.0'
}
test {
environment "ENVIRONMENT", 'DEVELOPMENT'
useJUnitPlatform()
}
jar {
manifest {
attributes([
'Timestamp' : System.currentTimeMillis(),
'Specification-Title' : project.archivesBaseName,
'Specification-Vendor' : project.vendor,
'Specification-Version' : project.version,
'Implementation-Title' : project.archivesBaseName,
'Implementation-Version' : project.version,
'Implementation-Vendor' : project.vendor,
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
'Main-Class' : 'com.diluv.api.Main'
])
}
}
jib {
to {
image = "diluv/diluv-api:" + version
tags = ['latest' + (isSnapshot() ? "-snapshot" : '')]
auth {
username = System.getenv("DOCKER_USERNAME") ?: ''
password = System.getenv("DOCKER_PASSWORD") ?: ''
}
}
}
//checkstyle {
// configFile = file("checkstyle.xml")
// toolVersion = '8.10'
//}
static String getBuildNumber() {
return System.getenv("GITHUB_RUN_NUMBER") ?: "0"
}
static boolean isSnapshot() {
String ref = System.getenv("GITHUB_REF");
if (ref != null && ref.startsWith("refs/tags/v")) {
return false
}
return true
}
task depsize {
doLast {
final formatStr = "%,10.2f"
final conf = configurations.default
final size = conf.collect { it.length() / (1024 * 1024) }.sum()
final out = new StringBuffer()
out << 'Total dependencies size:'.padRight(45)
out << "${String.format(formatStr, size)} Mb\n\n"
conf.sort { -it.length() }
.each {
out << "${it.name}".padRight(45)
out << "${String.format(formatStr, (it.length() / 1024))} kb\n"
}
println(out)
}
}