forked from TIGERs-Mannheim/Sumatra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
133 lines (119 loc) · 4.4 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
127
128
129
130
131
132
133
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
alias(libs.plugins.sonar)
alias(libs.plugins.versionCatalogUpdate)
id 'idea'
id 'sumatra.java'
id 'sumatra.jib'
id 'sumatra.application'
}
def gitDescribe = providers.exec {
commandLine("git", "describe", "--tags", "--always", "--first-parent")
}.standardOutput.asText.map { it.replace("merge/", "").trim() }
version gitDescribe.get()
processResources {
inputs.property("project.version", project.version)
filter ReplaceTokens, tokens: [
"application.version": project.version,
]
}
dependencies {
implementation project(':common')
implementation project(':common-gui')
implementation project(':common-gui-config')
implementation project(':sumatra-model')
implementation project(':sumatra-skillsystem')
implementation project(':sumatra-simulation-control')
implementation project(':sumatra-gui-skills')
implementation project(':sumatra-gui-ai')
implementation project(':sumatra-gui-bot')
implementation project(':sumatra-gui-bot-params')
implementation project(':sumatra-gui-log')
implementation project(':sumatra-gui-rcm')
implementation project(':sumatra-gui-referee')
implementation project(':sumatra-gui-replay')
implementation project(':sumatra-gui-sim')
implementation project(':sumatra-gui-timer')
implementation project(':sumatra-gui-wp')
implementation project(':sumatra-gui-logfile')
implementation project(':sumatra-gui-kick')
implementation project(':autoreferee-gui')
runtimeOnly project(':moduli-movement-limit-observer')
implementation project(':moduli-botmanager')
runtimeOnly project(':moduli-botmanager-sim')
implementation project(':moduli-botmanager-tigers')
implementation project(':moduli-ai')
implementation project(':moduli-record')
implementation project(':moduli-referee')
implementation project(':moduli-wp')
runtimeOnly project(':moduli-vision')
implementation project(':moduli-cam')
implementation project(':moduli-ai-controller')
implementation project(':moduli-vision-simulation')
implementation project(':moduli-autoreferee')
runtimeOnly project(':moduli-autoreferee-ci')
runtimeOnly project(':moduli-team-client')
implementation project(':moduli-bot-params')
implementation(libs.com.github.TIGERs.mannheim.moduli)
implementation(libs.org.apache.logging.log4j.log4j.api)
runtimeOnly(libs.org.apache.logging.log4j.log4j.core)
implementation(libs.commons.cli)
}
application {
mainClass.set('edu.tigers.sumatra.Sumatra')
applicationDefaultJvmArgs = [
// Change font (size):
// "-Dswing.plaf.metal.controlFont=sans-serif-16",
// "-Dswing.plaf.metal.userFont=sans-serif-16",
]
}
jib {
to {
image = "sumatra"
auth {
username = "docker"
password = System.getenv("GITLAB_DOCKER_REGISTRY_TOKEN") ?: ""
}
}
container {
workingDirectory = "/Sumatra"
}
extraDirectories {
paths {
path {
from = file('config')
into = '/Sumatra/config'
}
path {
from = file('src/main/jib')
into = '/Sumatra/'
}
}
permissions.put('/Sumatra/**', '777')
}
}
sonarqube {
properties {
property "sonar.projectKey", "main_Sumatra_AXyeyj5BLG1xSGHUS0Xf"
property "sonar.projectVersion", gitDescribe
property "sonar.host.url", System.getenv("SONARQUBE_URL")
property "sonar.login", System.getenv("SONARQUBE_AUTH_TOKEN")
if (System.getenv("CI_MERGE_REQUEST_IID") != null) {
property "sonar.pullrequest.key", System.getenv("CI_MERGE_REQUEST_IID")
property "sonar.pullrequest.branch", System.getenv("CI_MERGE_REQUEST_SOURCE_BRANCH_NAME")
property "sonar.pullrequest.base", System.getenv("CI_MERGE_REQUEST_TARGET_BRANCH_NAME")
} else {
property "sonar.branch.name", System.getenv("CI_COMMIT_REF_NAME")
}
}
}
def isNonStable = { String version ->
def stableKeyword = ['RELEASE', 'FINAL', 'GA', 'JRE'].any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9v]{1,3}\.([0-9,.v-]|(groovy))+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
versionCatalogUpdate {
versionSelector {
!isNonStable(it.candidate.version)
}
}