This repository has been archived by the owner on Nov 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy pathrelease.gradle
93 lines (84 loc) · 3.14 KB
/
release.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
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
ext {
versionName = '1.0.0-preview1'
}
group = 'com.badoo.chateau'
version = versionName
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
groupId 'com.badoo.chateau'
artifactId artifactId
name 'Chateau'
description 'libraryDescription'
url 'https://github.com/badoo/Chateau.git'
licenses {
license {
name 'The MIT License (MIT)'
url 'https://github.com/badoo/Chateau/blob/master/LICENSE.md'
}
}
developers {
developer {
id 'kingamajick'
name 'Rich King'
email '[email protected]'
}
developer {
id 'erikandre'
name 'Erik André'
email '[email protected]'
}
}
scm {
connection 'https://github.com/badoo/Chateau.git'
developerConnection 'https://github.com/badoo/Chateau.git'
url 'https://github.com/badoo/Chateau'
}
}
}
}
}
// Generate and jar the sources and javadoc
android.libraryVariants.all { variant ->
def name = variant.name.capitalize()
def sourcesJarTask = project.tasks.create(name: "sourcesJar${name}", type: Jar) {
from variant.javaCompile.source
classifier 'sources'
}
artifacts.add('archives', sourcesJarTask);
def javadocTask = project.tasks.create(name: "javadoc${name}", type: Javadoc) {
description = "Generates javadoc for build ${name}"
failOnError = false
destinationDir = new File(destinationDir, variant.baseName)
source = files(variant.javaCompile.source)
classpath = files(variant.javaCompile.classpath.files) + files(android.bootClasspath)
exclude '**/R.java', '**/BuildConfig.java'
options.links("http://docs.oracle.com/javase/7/docs/api/")
options.linksOffline("http://d.android.com/reference/", "$System.env.ANDROID_HOME/docs/reference")
}
def javadocJarTask = project.tasks.create(name: "javadocJar${name}", type: Jar, dependsOn: "javadoc${name}") {
from javadocTask.destinationDir
classifier = 'javadoc'
}
artifacts.add('archives', javadocJarTask);
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
dryRun = false
configurations = ['archives']
pkg {
repo = 'maven'
name = 'chateau'
licenses = ['MIT']
vcsUrl = 'https://github.com/badoo/Chateau.git'
version {
name = versionName
}
}
}