-
Notifications
You must be signed in to change notification settings - Fork 552
/
jfrog-artifactory-publish.gradle
39 lines (34 loc) · 1.09 KB
/
jfrog-artifactory-publish.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
apply plugin: 'com.jfrog.artifactory'
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.getDestinationDir()
}
artifacts {
archives javadocJar
archives sourcesJar
}
artifactory {
contextUrl = 'http://oss.jfrog.org/artifactory/'
publish {
repository {
// The Artifactory repository key to publish to
repoKey = versioning.name.endsWith('SNAPSHOT') ? 'libs-snapshot-local' : 'libs-release-local'
username = getProperties().get("bintray.user")
password = getProperties().get("bintray.apikey")
}
//noinspection GroovyAssignabilityCheck
defaults {
publishArtifacts = true
// Publish generated POM files to Artifactory (true by default)
publishPom = true
}
}
}