-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
113 lines (96 loc) · 3.77 KB
/
build.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
111
112
113
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
subprojects { proj ->
if (proj.name != "example")
{
proj.afterEvaluate {
proj.apply plugin: 'com.github.dcendents.android-maven'
proj.apply plugin: 'com.jfrog.bintray'
def gitUrl = "https://github.com/djavan-bertrand/JCVD"
proj.install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
// Add your description here
name 'JCVD library: an Awareness API helper'
// Set your license
licenses {
license {
name 'MIT'
url 'https://github.com/djavan-bertrand/JCVD/LICENSE'
}
}
developers {
developer {
id 'Sousoum'
name 'SousoumProd'
email '[email protected]'
}
}
scm {
connection gitUrl
developerConnection gitUrl
}
}
}
}
}
proj.bintray {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
user = properties.getProperty('bintray.user')
key = properties.getProperty('bintray.apikey')
pkg {
repo = 'maven'
name = "com.sousoum:jcvd"
licenses = ['MIT']
vcsUrl = gitUrl
version {
name = rootProject.version
desc = 'JCVD library: an Awareness API helper'
vcsTag = rootProject.releaseTag
}
}
configurations = ['archives']
}
task generateSourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier 'sources'
}
task generateJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath()
.join(File.pathSeparator))
failOnError false
}
task generateJavadocsJar(type: Jar, dependsOn: generateJavadocs) {
from generateJavadocs.destinationDir
classifier 'javadoc'
}
artifacts {
archives generateJavadocsJar
archives generateSourcesJar
}
}
}
}