forked from FIRST-Tech-Challenge/FtcRobotController
-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.gradle
34 lines (31 loc) · 1.05 KB
/
settings.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
pluginManagement {
plugins {
id 'org.jetbrains.kotlin.jvm' version '2.0.10'
}
}
include ':FtcRobotController'
include ':WilyWorks'
include ':WilyCore'
def team = null
File propertiesFile = file('my.properties')
if (propertiesFile.exists()) {
Properties properties = new Properties()
properties.load(propertiesFile.newDataInputStream())
team = properties.getProperty('team')
if (team != null) {
team = team[0].toUpperCase() + team[1..-1] // Make first character upper-case
if ((team != 'Team417') && (team != 'Team6220') && (team != 'Team8923') && (team != 'TeamMentor')) {
println("ERROR: The team property in 'my.properties' is set to '" + team + "', " +
"it needs to be Team417, Team6220, Team8923 or TeamMentor\n")
}
}
}
if (team != null) {
println(team + " rules!\n")
include team
} else {
println("Hi there Swerve person, please create the 'my.properties' file to enable fast loads!\n")
include ':Team417'
include ':Team6220'
include ':TeamMentor'
}