forked from mekomsolutions/openmrs-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
48 lines (41 loc) · 1.08 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
apply plugin: 'distribution'
distZip.enabled = true
distTar.enabled = false
allprojects {
group = 'net.mekomsolutions'
version = '3.0.0-SNAPSHOT'
}
// subprojects are supposed to copy their output files under /openmrs-cd inside the main build dir
distributions {
main {
baseName = 'openmrs-cd'
contents {
from { "$buildDir/openmrs-cd" }
}
}
}
apply plugin: 'maven-publish'
// this is to work both locally (via gradle.properties) and on Travis CI (via envvars)
def repoUrl = hasProperty('mksRepoUrl') ? mksRepoUrl : System.getenv('mksRepoUrl')
def repoUsername = hasProperty('mksRepoUsername') ? mksRepoUsername : System.getenv('mksRepoUsername')
def repoPassword = hasProperty('mksRepoPassword') ? mksRepoPassword : System.getenv('mksRepoPassword')
publishing {
publications {
myDistribution(MavenPublication) {
artifact distZip
}
}
repositories {
maven {
name 'mks-repo'
url repoUrl
credentials {
username = repoUsername
password = repoPassword
}
}
}
}
task deploy() {
dependsOn assemble, publish
}