-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.gradle
60 lines (55 loc) · 1.51 KB
/
deploy.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
//apply plugin: 'maven'
//
//uploadArchives {
// repositories {
// mavenDeployer {
// repository(url: rootProject.ext.url) {
// authentication(userName: rootProject.ext.username, password: rootProject.ext.password)
// }
//
// pom.project {
// name project.name
// version project.version
// artifactId project.name
// groupId project.group
// packaging 'jar'
// description 'knx-core'
//
// licenses {
// license {
// name 'The Apache Software License, Version 2.0'
// url 'http://wiki.bidostar.com/pages/viewpage.action?pageId=3943695'
// }
// }
// }
// }
// }
//}
apply plugin: 'maven-publish'
def isReleaseBuild() {
return version.endsWith("SNAPSHOT") == false
}
def getRepository() {
if (isReleaseBuild()) {
return rootProject.repositories.findByName('release-mvn')
} else {
return rootProject.repositories.findByName('snapshot-mvn')
}
}
publishing {
publications {
publishProject(MavenPublication){
from components.java
}
}
repositories {
maven {
def repo = getRepository()
url repo.url
credentials {
username repo.credentials.username
password repo.credentials.password
}
}
}
}