1
1
apply plugin : ' com.android.library'
2
2
apply plugin : ' com.github.dcendents.android-maven'
3
+ apply plugin : ' com.jfrog.bintray'
4
+ apply plugin : ' maven-publish'
3
5
4
- group= ' com.github.codepath'
6
+ group= ' com.codepath.libraries'
7
+
8
+ ext {
9
+ ARTIFACT = " asynchttpclient"
10
+ POM_NAME = " CodePath Async Http Client"
11
+ POM_DESC = " Async Http Client wrapper using OkHttp"
12
+ POM_SCM_URL = ' https://github.com/codepath/AsyncHttpClient'
13
+ BASE_VERSION = 1
14
+ VERSION_NAME = " 0.1"
15
+ }
16
+
17
+ version = VERSION_NAME
18
+ archivesBaseName = ARTIFACT
5
19
6
20
android {
7
21
compileSdkVersion 29
8
22
9
-
10
23
defaultConfig {
11
24
minSdkVersion 21
12
25
targetSdkVersion 29
13
- versionCode 1
14
- versionName " 1.0 "
26
+ versionCode BASE_VERSION
27
+ versionName VERSION_NAME
15
28
16
29
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
17
30
@@ -36,3 +49,32 @@ dependencies {
36
49
androidTestImplementation ' androidx.test:runner:1.2.0'
37
50
androidTestImplementation ' androidx.test.espresso:espresso-core:3.2.0'
38
51
}
52
+
53
+ bintray {
54
+ user = project. hasProperty(' bintrayUser' ) ? project. property(' bintrayUser' ) : System . getenv(' BINTRAY_USER' )
55
+ key = project. hasProperty(' bintrayApiKey' ) ? project. property(' bintrayApiKey' ) : System . getenv(' BINTRAY_API_KEY' )
56
+ configurations = [' archives' ]
57
+
58
+ pkg {
59
+ repo = ' maven'
60
+ name = ' asynchttpclient'
61
+ userOrg = ' codepath'
62
+ licenses = [' Apache-2.0' ]
63
+ vcsUrl = POM_SCM_URL
64
+ version {
65
+ name = BASE_VERSION
66
+ desc = POM_NAME
67
+ released = new Date ()
68
+ }
69
+ }
70
+
71
+ }
72
+
73
+ task sourcesJar (type : Jar ) {
74
+ from android. sourceSets. main. java. srcDirs
75
+ archiveClassifier. set(" sources" )
76
+ }
77
+
78
+ artifacts {
79
+ archives sourcesJar
80
+ }
0 commit comments