This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
gradle-bintray-push.gradle
75 lines (62 loc) · 2.22 KB
/
gradle-bintray-push.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
ext {
bintrayRepo = 'maven'
bintrayName = 'calendar'
publishedGroupId = 'com.jonaswanke.calendar'
libraryName = 'Calendar'
artifact = 'calendar'
libraryDescription = 'Material Design CalendarView for Android'
siteUrl = 'https://github.com/JonasWanke/com.jonaswanke.calendar'
gitUrl = 'https://github.com/JonasWanke/com.jonaswanke.calendar.git'
githubRepository = 'JonasWanke/com.jonaswanke.calendar'
libraryVersion = rootProject.versionName
developerId = 'JonasWanke'
developerName = 'Jonas Wanke'
developerEmail = '[email protected]'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
publishing {
publications {
Production(MavenPublication) {
artifact("$buildDir/outputs/aar/calendar-release.aar")
groupId publishedGroupId
artifactId artifact
version libraryVersion
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.implementation.allDependencies.each {
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 = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
dryRun = false
override = false
publish = true
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
version {
name = libraryVersion
vcsTag = libraryVersion
}
}
publications = ['Production']
}