Skip to content

Commit b98a34a

Browse files
committed
update Android SDK version
add cat image bump versions Bump to use Gradle's maven-publish
1 parent 29d93d4 commit b98a34a

File tree

6 files changed

+34
-24
lines changed

6 files changed

+34
-24
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To use this library, add the following to your `.gradle` file:
1717

1818
```gradle
1919
dependencies {
20-
implementation 'com.codepath.libraries:asynchttpclient:0.0.9'
20+
implementation 'com.codepath.libraries:asynchttpclient:2.0.0'
2121
}
2222
```
2323

build.gradle

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ buildscript {
77

88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.4.2'
11-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' // Add this line
10+
classpath 'com.android.tools.build:gradle:4.0.1'
1211
// NOTE: Do not place your application dependencies here; they belong
1312
// in the individual module build.gradle files
1413
}
1514
}
1615

1716
plugins {
18-
id "com.jfrog.bintray" version "1.8.4"
17+
id "com.jfrog.bintray" version "1.8.5"
1918
}
2019

2120
allprojects {

example/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ def apikeyProperties = new Properties()
55
apikeyProperties.load(new FileInputStream(apikeyPropertiesFile))
66

77
android {
8-
compileSdkVersion 29
8+
compileSdkVersion 30
99
defaultConfig {
1010
applicationId "com.codepath.cpasynchttpclient"
1111
minSdkVersion 21
12-
targetSdkVersion 29
12+
targetSdkVersion 30
1313
versionCode 1
1414
versionName "1.0"
1515
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

example/src/main/res/raw/cat.jpg

72 KB
Loading

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

library/build.gradle

+28-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'com.github.dcendents.android-maven'
2+
apply plugin: 'maven-publish'
33
apply plugin: 'com.jfrog.bintray'
44
apply plugin: 'maven-publish'
55

@@ -10,19 +10,19 @@ ext {
1010
POM_NAME = "CodePath Async Http Client"
1111
POM_DESC = "Async Http Client wrapper using OkHttp"
1212
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"
1515
}
1616

1717
version = VERSION_NAME
1818
archivesBaseName = ARTIFACT
1919

2020
android {
21-
compileSdkVersion 29
21+
compileSdkVersion 30
2222

2323
defaultConfig {
2424
minSdkVersion 21
25-
targetSdkVersion 29
25+
targetSdkVersion 30
2626
versionCode BASE_VERSION
2727
versionName VERSION_NAME
2828

@@ -42,19 +42,39 @@ android {
4242
dependencies {
4343
implementation fileTree(dir: 'libs', include: ['*.jar'])
4444

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"
4747
api 'com.facebook.stetho:stetho-okhttp3:1.5.1'
4848

4949
testImplementation 'junit:junit:4.12'
5050
androidTestImplementation 'androidx.test:runner:1.2.0'
5151
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
5252
}
5353

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+
5474
bintray {
5575
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
5676
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
57-
configurations = ['archives']
77+
publications = ['release']
5878

5979
pkg {
6080
repo = 'maven'
@@ -70,12 +90,3 @@ bintray {
7090
}
7191

7292
}
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

Comments
 (0)