-
Notifications
You must be signed in to change notification settings - Fork 0
/
android-release-aar.gradle
108 lines (97 loc) · 3.28 KB
/
android-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
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
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
def pub_artifactId = project.PUBLISH_ARTIFACT_ID
def siteUrl = 'https://github.com/anggrayudi/ShowOff'
def gitUrl = 'https://github.com/anggrayudi/ShowOff.git'
def pkgOpts = project.packagingMode
def libsDesc = project.libsDesc
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging pkgOpts
name pub_artifactId
description libsDesc
url siteUrl
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'https://github.com/anggrayudi/ShowOff/blob/master/LICENSE'
}
}
developers {
developer {
id 'anggrayudi'
name 'Anggrayudi H'
organization "Anggrayudi Apps"
organizationUrl 'https://github.com/anggrayudi'
}
}
scm {
connection "scm:git:git://github.com/anggrayudi/ShowOff.git"
developerConnection "scm:git:ssh://github.com:anggrayudi/ShowOff.git"
url "https://github.com/anggrayudi/ShowOff"
}
}
}
}
}
if (project.getPlugins().hasPlugin('com.android.application') ||
project.getPlugins().hasPlugin('com.android.library')) {
task androidJavadocs(type: Javadoc) {
failOnError false
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
archiveClassifier.set('javadoc')
from androidJavadocs.destinationDir
}
task androidSourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
archiveClassifier.set('sources')
}
} else {
task sourcesJar(type: Jar, dependsOn:classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn:javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
artifacts {
if (project.getPlugins().hasPlugin('com.android.application') ||
project.getPlugins().hasPlugin('com.android.library')) {
archives androidSourcesJar
archives androidJavadocsJar
} else {
archives sourcesJar
archives javadocJar
}
}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = findProperty("bintray.user") ?: ''
key = findProperty("bintray.apikey") ?: ''
configurations = ['archives']
pkg {
repo = 'maven'
name = pub_artifactId
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
publicDownloadNumbers = true
}
}