This repository has been archived by the owner on Sep 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
185 lines (158 loc) · 4.96 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
apply plugin: 'com.android.library'
apply plugin: 'jacoco-android'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'
version = "3.0.10"
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
}
}
configurations {
javadocDeps
}
android {
compileSdkVersion 23
defaultConfig {
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName version
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
lintOptions {
abortOnError false
}
sourceSets {
main.setRoot('src/main')
}
}
repositories {
google()
jcenter()
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// Temporary using v21, until Travis supports v23+
implementation 'com.android.support:appcompat-v7:23.0.1'
implementation 'tech.gusavila92:java-android-websocket-client:1.2.2'
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-junit:2.0.0.0'
testImplementation 'org.mockito:mockito-core:1.9.5'
testImplementation 'org.skyscreamer:jsonassert:1.5.0'
// for not mocking JSONObject
testImplementation files('libs-test/json-20140107.jar')
androidTestImplementation 'junit:junit:4.12'
implementation 'com.android.support:support-annotations:21.0.1'
javadocDeps 'com.android.support:support-annotations:22.2.0'
}
ext {
bintrayRepo = 'maven'
bintrayName = 'kuzzle-sdk-android'
publishedGroupId = 'io.kuzzle'
libraryName = 'kuzzle-sdk-android'
artifact = 'sdk-android'
libraryDescription = 'Kuzzle Android SDK aar'
siteUrl = 'https://github.com/kuzzleio/sdk-android'
gitUrl = 'https://github.com/kuzzleio/sdk-android.git'
githubRepository= 'kuzzleio/sdk-android'
libraryVersion = version
developerId = 'kblondel'
developerName = 'Kevin Blondel'
developerEmail = '[email protected]'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
// from: 'https://raw.githubusercontent.com/nisrulz/JCenter/master/installv1.gradle'
apply plugin: 'com.github.dcendents.android-maven'
group = publishedGroupId // Maven Group ID for the artifact
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact
// Add your description here
name libraryName
description libraryDescription
url siteUrl
// Set your license
licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
// from: 'https://raw.githubusercontent.com/nisrulz/JCenter/master/bintrayv1.gradle'
apply plugin: 'com.jfrog.bintray'
task sourcesJar(type: Jar) {
classifier = '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)) + configurations.javadocDeps + configurations.compile
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
// Bintray
bintray {
user = System.getenv("bintray_user")
key = System.getenv("bintray_apikey")
configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
issueTrackerUrl = siteUrl+'/issues'
vcsUrl = gitUrl
licenses = allLicenses
githubRepo = githubRepository //Optional Github repository
githubReleaseNotesFile = 'README.md' //Optional Github readme file
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
}
}
}