1
1
apply plugin : ' com.android.library'
2
- apply plugin : ' com.github.dcendents.android- maven'
2
+ apply plugin : ' maven-publish '
3
3
apply plugin : ' com.jfrog.bintray'
4
4
apply plugin : ' maven-publish'
5
5
@@ -10,19 +10,19 @@ ext {
10
10
POM_NAME = " CodePath Async Http Client"
11
11
POM_DESC = " Async Http Client wrapper using OkHttp"
12
12
POM_SCM_URL = ' https://github.com/codepath/AsyncHttpClient'
13
- BASE_VERSION = 1
14
- VERSION_NAME = " 0.1 .0"
13
+ BASE_VERSION = 2
14
+ VERSION_NAME = " 2.0 .0"
15
15
}
16
16
17
17
version = VERSION_NAME
18
18
archivesBaseName = ARTIFACT
19
19
20
20
android {
21
- compileSdkVersion 29
21
+ compileSdkVersion 30
22
22
23
23
defaultConfig {
24
24
minSdkVersion 21
25
- targetSdkVersion 29
25
+ targetSdkVersion 30
26
26
versionCode BASE_VERSION
27
27
versionName VERSION_NAME
28
28
@@ -42,19 +42,39 @@ android {
42
42
dependencies {
43
43
implementation fileTree(dir : ' libs' , include : [' *.jar' ])
44
44
45
- implementation ' androidx.appcompat:appcompat:1.0.2 '
46
- api " com.squareup.okhttp3:okhttp:4.0.1 "
45
+ implementation ' androidx.appcompat:appcompat:1.2.0 '
46
+ api " com.squareup.okhttp3:okhttp:4.5.0 "
47
47
api ' com.facebook.stetho:stetho-okhttp3:1.5.1'
48
48
49
49
testImplementation ' junit:junit:4.12'
50
50
androidTestImplementation ' androidx.test:runner:1.2.0'
51
51
androidTestImplementation ' androidx.test.espresso:espresso-core:3.2.0'
52
52
}
53
53
54
+
55
+ // Because the components are created only during the afterEvaluate phase, you must
56
+ // configure your publications using the afterEvaluate() lifecycle method.
57
+ afterEvaluate {
58
+ publishing {
59
+ publications {
60
+ // Creates a Maven publication called "release".
61
+ release(MavenPublication ) {
62
+ // Applies the component for the release build variant.
63
+ from components. release
64
+
65
+ // You can then customize attributes of the publication as shown below.
66
+ groupId = group
67
+ artifactId = ARTIFACT
68
+ version = VERSION_NAME
69
+ }
70
+ }
71
+ }
72
+ }
73
+
54
74
bintray {
55
75
user = project. hasProperty(' bintrayUser' ) ? project. property(' bintrayUser' ) : System . getenv(' BINTRAY_USER' )
56
76
key = project. hasProperty(' bintrayApiKey' ) ? project. property(' bintrayApiKey' ) : System . getenv(' BINTRAY_API_KEY' )
57
- configurations = [' archives ' ]
77
+ publications = [' release ' ]
58
78
59
79
pkg {
60
80
repo = ' maven'
@@ -70,12 +90,3 @@ bintray {
70
90
}
71
91
72
92
}
73
-
74
- task sourcesJar (type : Jar ) {
75
- from android. sourceSets. main. java. srcDirs
76
- archiveClassifier. set(" sources" )
77
- }
78
-
79
- artifacts {
80
- archives sourcesJar
81
- }
0 commit comments