forked from floschu/Reaktor
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy.gradle
More file actions
106 lines (92 loc) · 3.09 KB
/
deploy.gradle
File metadata and controls
106 lines (92 loc) · 3.09 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
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
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
def artifact = new Properties()
artifact.load(new FileInputStream("$project.name/deploy.settings"))
def localProperties = new Properties()
localProperties.load(project.rootProject.file('local.properties').newDataInputStream())
group = artifact.groupId
version = config.version
install {
repositories.mavenInstaller {
pom.project {
packaging 'aar'
groupId artifact.groupId
artifactId artifact.id
name artifact.name
description artifact.description
url artifact.webUrl
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id localProperties.getProperty("developer.id")
name localProperties.getProperty("developer.name")
email localProperties.getProperty("developer.email")
}
}
scm {
connection artifact.gitUrl
developerConnection artifact.gitUrl
url artifact.webUrl
}
}
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 = 'Reaktor'
name = artifact.id
desc = artifact.description
websiteUrl = artifact.webUrl
vcsUrl = artifact.gitUrl
licenses = ["Apache-2.0"]
dryRun = false
publish = true
override = false
publicDownloadNumbers = true
version {
desc = artifact.description
}
}
}
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
}