forked from liferay/liferay-mobile-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release-aar.gradle
73 lines (63 loc) · 1.52 KB
/
release-aar.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
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'signing'
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
}
task jarJavadoc(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task jarSources(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives jarJavadoc
archives jarSources
}
signing {
sign configurations.archives
}
install {
repositories.mavenInstaller {
pom.project {
name project.description
description project.description
url 'https://www.liferay.com/community/liferay-projects/liferay-mobile-sdk/overview'
licenses {
license {
name 'LGPL 2.1'
url 'http://opensource.org/licenses/lgpl-2.1.php'
distribution 'repo'
}
}
scm {
url 'https://github.com/brunofarache/liferay-push'
connection 'scm:git:git://github.com/brunofarache/liferay-push.git'
}
developers {
developer {
id 'brunofarache'
name 'Bruno Farache'
email '[email protected]'
}
}
}
}
}
task release(type: Copy, dependsOn: install) {
from "$buildDir/outputs/aar"
from "$buildDir/libs"
from "$buildDir/poms"
into "$buildDir/release"
exclude "${project.name}-debug.aar"
rename { String name ->
name.replace("${project.name}-release", "${project.name}-${version}")
}
rename { String name ->
name.replace('pom-default.xml', "${project.name}-${version}.pom")
}
doLast {
signing.sign file("build/release/${project.name}-${version}.pom")
}
}