-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
100 lines (86 loc) · 2.69 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
import java.time.ZoneId
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
classpath "com.netflix.nebula:gradle-ospackage-plugin:8.5.1"
classpath "com.palantir.gradle.gitversion:gradle-git-version:0.12.3"
}
}
plugins {
id 'org.springframework.boot' version '2.4.4'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group = 'uk.co.ractf'
version = '0.0.8'
sourceCompatibility = '11'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.eclipse.jgit:org.eclipse.jgit:5.11.0.202103091610-r'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'org.postgresql:postgresql'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'application'
apply plugin: 'nebula.ospackage'
apply plugin: 'com.palantir.git-version'
mainClassName = 'uk.co.ractf.yakrazor.YakrazorApplication'
shadowJar {
mergeServiceFiles()
exclude 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.SF'
manifest {
attributes 'Implementation-Title': name
attributes 'Implementation-Version': version
attributes 'Implementation-Vendor-Id': group
attributes 'Build-Time': ZonedDateTime.now(ZoneId.of("UTC"))
.format(DateTimeFormatter.ISO_ZONED_DATE_TIME)
attributes 'Built-By': InetAddress.localHost.hostName
attributes 'Created-By': 'Gradle ' + gradle.gradleVersion
attributes 'Main-Class': mainClassName
}
archiveName 'yakrazor.jar'
}
bootJar {
archiveName 'yakrazor.jar'
}
buildRpm {
packageName = 'yakrazor'
def details = versionDetails(prefix: 'rc@')
release = details.lastTag
version = rootProject.version
arch = 'X86_64'
os = 'LINUX'
license = 'AGPL'
url = 'https://github.com/ractf/yakrazor'
vendor = 'RACTF'
packageDescription = 'The RACTF test runner'
maintainer = 'RACTF <admins@ractf.co.uk>'
user = 'root'
group = 'root'
requires('systemd')
requires('java-11-openjdk')
requires('docker-ce')
requires('docker-compose')
from(bootJar.outputs.files) {
into '/opt/yakrazor'
createDirectoryEntry = true
}
from('src/main/dist/bin') {
into '/etc/systemd/system'
addParentDirs = false
}
}