-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextras.gradle
More file actions
26 lines (25 loc) · 852 Bytes
/
extras.gradle
File metadata and controls
26 lines (25 loc) · 852 Bytes
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
ext {
isReleaseBuild = {
return !version.contains("SNAPSHOT")
}
shouldSign = {
return project.hasProperty('SIGN_PUBLISH') && !version.contains("SNAPSHOT")
}
getNexusUsername = {
return rootProject.hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : System.getenv('NEXUS_USERNAME')
}
getNexusPassword = {
return rootProject.hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : System.getenv('NEXUS_PASSWORD')
}
setPropertyGlobal = { key ->
if (rootProject.hasProperty(key)) {
project.setProperty(key, rootProject.getProperty(key))
}
}
setPropertyGlobalFile = { key ->
if (rootProject.hasProperty(key)) {
def file = rootProject.file(rootProject.getProperty(key)).absolutePath
project.setProperty(key, file)
}
}
}