forked from TIGERs-Mannheim/AutoReferee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
116 lines (98 loc) · 3.25 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
/*
* Copyright (c) 2009 - 2021, DHBW Mannheim - TIGERs Mannheim
*/
plugins {
id 'sumatra.java-conventions'
id 'application'
id 'com.palantir.git-version' version '0.12.3'
id 'ca.cutterslade.analyze' version '1.4.3'
id 'com.google.cloud.tools.jib' version '2.7.0'
id "com.github.breadmoirai.github-release" version "2.2.12"
}
ext.versionDetails = versionDetails(prefix: "version/")
version gitVersion(prefix: "version/")
tasks.named('wrapper').configure {
// Use the 'all' distributable when upgrading the Gradle wrapper
distributionType = Wrapper.DistributionType.ALL
}
dependencies {
implementation project(':autoreferee-gui')
implementation project(':common-gui')
implementation project(':common-gui-config')
implementation project(':sumatra-model')
implementation project(':sumatra-gui-log')
implementation project(':sumatra-gui-referee')
implementation project(':sumatra-gui-replay')
implementation project(':sumatra-gui-visualizer')
implementation project(':moduli-record')
implementation project(':moduli-autoreferee')
runtimeOnly project(':moduli-wp')
runtimeOnly project(':moduli-referee')
implementation 'com.github.TIGERs-Mannheim:moduli:2.2'
implementation 'com.github.TIGERs-Mannheim:infonode:1.7.0'
implementation 'org.apache.logging.log4j:log4j-api:2.12.1'
runtimeOnly 'org.apache.logging.log4j:log4j-core:2.12.1'
runtimeOnly 'org.apache.logging.log4j:log4j-1.2-api:2.12.1'
runtimeOnly 'org.slf4j:slf4j-log4j12:1.7.25'
implementation 'commons-cli:commons-cli:1.4'
}
application {
mainClass.set('edu.tigers.autoref.AutoReferee')
applicationDefaultJvmArgs = [
'-Xms64m',
'-Xmx2G',
'-server',
'-Dsun.java2d.d3d=false',
'-Djava.net.preferIPv4Stack=true',
]
}
jib {
to {
image = "registry.hub.docker.com/tigersmannheim/auto-referee:latest"
auth {
username = System.getenv("DOCKER_HUB_USERNAME") ?: ""
password = System.getenv("DOCKER_HUB_PASSWORD") ?: ""
}
tags = [rootProject.version]
}
from {
// gcr.io/distroless/java:11
image = "gcr.io/distroless/java@sha256:9d4092ba5e1c9dc4d1490fdead1dd7ea5c64e635b729fee11a6af55f51b337f8"
}
extraDirectories {
paths {
path {
from = file('config')
into = '/config'
}
path {
from = file('src/main/jib')
into = '/'
}
}
}
}
run.workingDir = rootProject.projectDir
// set version here to avoid overriding the project version.
// version is set to null to skip it completely in the artifact names
// Thus, it is guaranteed that old artifacts are always overwritten.
distZip.archiveVersion.convention(null)
jar.archiveVersion.convention(null)
// disable tar distribution to avoid redundant artifacts
distTar.enabled = false
distributions {
main {
contents {
from('config') {
into 'config'
}
}
}
}
githubRelease {
token System.getenv("GITHUB_TOKEN") ?: ""
owner "TIGERs-Mannheim"
repo.set("AutoReferee")
releaseAssets distZip
tagName.set("version-${versionDetails.lastTag}")
}