-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
86 lines (70 loc) · 2.82 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
plugins {
id 'java'
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: 'com.diluv.nodecdn', name: 'NodeCDN-Api', version: '1.0.0'
implementation group: 'com.diluv.clamchowder', name: 'Clam-Chowder', version: '1.0.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.14.1'
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
implementation group: 'org.bouncycastle', name: 'bcpg-jdk15on', version: '1.69'
implementation 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: '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 {
useJUnitPlatform()
environment "ENVIRONMENT", "TESTING"
}
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.hilo.Main'
])
}
}
jib {
to {
image = "diluv/hilo:" + version
tags = ['latest' + (isSnapshot() ? "-snapshot" : '')]
auth {
username = System.getenv("DOCKER_USERNAME") ?: ''
password = System.getenv("DOCKER_PASSWORD") ?: ''
}
}
}
checkstyle {
toolVersion "8.36.2"
}
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
}