-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.gradle
110 lines (96 loc) · 3.22 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
def artifactName = 'TAConfetti'
def artifactGroupId = 'com.tailoredapps'
def artifactIdlul = 'confetti'
def artifactGitUrl = 'https://github.com/tailoredmedia/TAAndroidConfetti.git'
def artifactWebUrl = 'https://github.com/tailoredmedia/TAAndroidConfetti'
def artifactDescription = 'Displays Tailored Apps Confetti.'
def localProperties = new Properties()
localProperties.load(project.rootProject.file('local.properties').newDataInputStream())
group = artifactGroupId
version = libraryVersion
install {
repositories.mavenInstaller {
pom.project {
packaging 'aar'
groupId artifactGroupId
artifactId artifactIdlul
name artifactName
description artifactDescription
url artifactWebUrl
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'tailoredmedia'
name 'Tailored Apps'
email '[email protected]'
}
}
scm {
connection artifactGitUrl
developerConnection artifactGitUrl
url artifactWebUrl
}
}
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.api.allDependencies.withType(ModuleDependency) { ModuleDependency dp ->
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dp.group)
dependencyNode.appendNode('artifactId', dp.name)
dependencyNode.appendNode('version', dp.version)
}
}
}
}
bintray {
user = localProperties.getProperty("bintray.user")
key = localProperties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = 'TAConfetti'
name = artifactIdlul
desc = artifactDescription
websiteUrl = artifactWebUrl
vcsUrl = artifactGitUrl
licenses = ["Apache-2.0"]
dryRun = false
publish = true
override = false
publicDownloadNumbers = true
version {
desc = artifactDescription
}
}
}
if (project.hasProperty("kotlin")) { //Kotlin libraries
task sourcesJar(type: Jar) {
archiveClassifier.set("sources")
from android.sourceSets.main.java.srcDirs
}
task javadoc(type: Javadoc, dependsOn: dokka) {
}
} else if (project.hasProperty("android")) {
task sourcesJar(type: Jar) {
archiveClassifier.set("sources")
from android.sourceSets.main.java.srcDirs
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set("javadoc")
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}