-
Notifications
You must be signed in to change notification settings - Fork 17
/
settings.gradle
32 lines (27 loc) · 1.06 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
// Copyright DataStax, Inc.
// Please see the included license file for details.
rootProject.name = 'cass-config-builder'
/*
The credentials are provided typically in 'gradle.properties' in the project root.
If needed, the repo location and the credentials could be changed.
Place the values in 'gradle.properties' or pass them via the command line with -P switches.
*/
def propertyExists(name) {
settings.hasProperty(name) || System.properties[(name)] != null
}
def propertiesExist(names) {
names.every { propertyExists(it)}
}
def propertyValue(name) {
settings.hasProperty(name) ? settings.getProperty(name) : System.properties[(name)]
}
if (propertiesExist(['mavenRepositoryUsername', 'mavenRepositoryPassword'])) {
def repoUrl = propertyValue('mavenRepositoryUrl')
def repoUsername = propertyValue('mavenRepositoryUsername')
def repoPassword = propertyValue('mavenRepositoryPassword')
gradle.beforeProject { proj ->
proj.ext.repoUrl = repoUrl
proj.ext.repoUsername = repoUsername
proj.ext.repoPassword = repoPassword
}
}