-
Notifications
You must be signed in to change notification settings - Fork 5
/
artifactory.gradle
42 lines (38 loc) · 1.11 KB
/
artifactory.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
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
publishing {
publications {
mavenJava(MavenPublication) {
groupId cgGroup
artifactId project.name
version cgVersion
from components.java
artifact sourceJar
artifact javadocJar
pom.withXml { xmlProvider ->
// Create string from project.ext.pomXml
def pomString = new StringWriter()
pomXml.writeTo(pomString)
pomString = pomString.toString()
// Replace default xml with pomXml
def xmlStringBuilder = xmlProvider.asString()
xmlStringBuilder.setLength(0)
xmlStringBuilder.append(pomString)
}
}
}
}
artifactory {
contextUrl = 'https://oss.jfrog.org/artifactory'
publish {
repository {
repoKey = 'oss-snapshot-local'
username = bintrayUser
password = bintrayKey
maven = true
}
defaults {
publications('mavenJava')
}
}
}