-
Notifications
You must be signed in to change notification settings - Fork 125
Expand file tree
/
Copy pathpublish.gradle
More file actions
55 lines (50 loc) · 1.87 KB
/
publish.gradle
File metadata and controls
55 lines (50 loc) · 1.87 KB
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
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
version '1.0.0'
group 'com.bintray'
publishing {
publications {
Production(MavenPublication) {
artifact("$buildDir/outputs/aar/app-release.aar")
groupId
artifactId 'example'
version this.version
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
// Iterate over the implementation dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.implementation.allDependencies.each {
// Ensure dependencies such as fileTree are not included in the pom.
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ?: System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ?: System.getenv('BINTRAY_API_KEY')
publications = ['Production']
configurations = ['archives']
override = true
pkg {
repo = 'maven'
name = 'example'
description = "An example of using the bintray plugin with gradle plugin 3.0.0"
publish = true
publicDownloadNumbers = true
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/bintray/gradle-bintray-plugin.git'
dryRun = true
version {
name = this.version
desc = "Example ${this.version}"
released = new Date()
vcsTag = this.version
}
}
}