Skip to content

Commit e0379c3

Browse files
committed
LIBbb11120
1 parent ed65e7e commit e0379c3

13 files changed

Lines changed: 135 additions & 48 deletions
599 Bytes
Binary file not shown.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Features
1010
- Requests use a **threadpool** to cap concurrent resource usage
1111
- GET/POST **params builder** (RequestParams)
1212
- **Multipart file uploads** with no additional third party libraries
13+
- Tiny size overhead to your application, only **100kb** for everything
1314
- Automatic smart **request retries** optimized for spotty mobile connections
1415
- Automatic **gzip** response decoding support for super-fast requests
1516
- Optional built-in response parsing into **JSON** (JsonHttpResponseHandler)

gradle-mvn-push.gradle

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/*
2+
* Copyright 2017 Vorlonsoft LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
apply plugin: 'maven'
18+
apply plugin: 'signing'
19+
20+
def isReleaseBuild() {
21+
return !VERSION_NAME.contains("SNAPSHOT")
22+
}
23+
24+
def getReleaseRepositoryUrl() {
25+
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
26+
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
27+
}
28+
29+
def getSnapshotRepositoryUrl() {
30+
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
31+
: "https://oss.sonatype.org/content/repositories/snapshots/"
32+
}
33+
34+
def getRepositoryUsername() {
35+
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
36+
}
37+
38+
def getRepositoryPassword() {
39+
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
40+
}
41+
42+
afterEvaluate { project ->
43+
uploadArchives {
44+
repositories {
45+
mavenDeployer {
46+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
47+
48+
pom.groupId = GROUP
49+
pom.artifactId = POM_ARTIFACT_ID
50+
pom.version = VERSION_NAME
51+
52+
repository(url: getReleaseRepositoryUrl()) {
53+
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
54+
}
55+
snapshotRepository(url: getSnapshotRepositoryUrl()) {
56+
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
57+
}
58+
59+
pom.project {
60+
name POM_NAME
61+
packaging POM_PACKAGING
62+
description POM_DESCRIPTION
63+
url POM_URL
64+
65+
scm {
66+
url POM_SCM_URL
67+
connection POM_SCM_CONNECTION
68+
developerConnection POM_SCM_DEV_CONNECTION
69+
}
70+
71+
licenses {
72+
license {
73+
name POM_LICENCE_NAME
74+
url POM_LICENCE_URL
75+
distribution POM_LICENCE_DIST
76+
}
77+
}
78+
79+
developers {
80+
developer {
81+
id POM_DEVELOPER_ID
82+
name POM_DEVELOPER_NAME
83+
}
84+
}
85+
}
86+
}
87+
}
88+
}
89+
90+
signing {
91+
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
92+
sign configurations.archives
93+
}
94+
95+
task androidJavadocs(type: Javadoc) {
96+
source = android.sourceSets.main.java.srcDirs
97+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
98+
classpath += project.android.libraryVariants.toList().first().javaCompile.classpath
99+
}
100+
101+
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
102+
classifier = 'javadoc'
103+
from androidJavadocs.destinationDir
104+
}
105+
106+
task androidSourcesJar(type: Jar) {
107+
classifier = 'sources'
108+
from android.sourceSets.main.java.sourceFiles
109+
}
110+
111+
artifacts {
112+
archives androidSourcesJar
113+
archives androidJavadocsJar
114+
}
115+
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
VERSION_NAME=1.5.0
16-
VERSION_CODE=150
15+
VERSION_NAME=1.5.1
16+
VERSION_CODE=151
1717
GROUP=com.vorlonsoft
1818

1919
POM_DESCRIPTION=An Asynchronous HTTP Library for Android

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Sat Nov 18 21:52:01 MSK 2017
1+
#Sun Nov 19 01:14:10 MSK 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME

library/build.gradle

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ android {
2323
defaultConfig {
2424
minSdkVersion 9
2525
targetSdkVersion 27
26-
versionCode 150
27-
versionName "1.5.0"
26+
versionCode 151
27+
versionName "1.5.1"
2828
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
2929
}
3030
compileOptions {
@@ -35,7 +35,6 @@ android {
3535
release {
3636
postprocessing {
3737
removeUnusedCode false
38-
removeUnusedResources false
3938
obfuscate false
4039
optimizeCode false
4140
proguardFile 'proguard-rules.pro'
@@ -80,10 +79,10 @@ android {
8079
dependencies {
8180
implementation fileTree(dir: 'libs', include: ['*.jar'])
8281
implementation 'com.android.support:support-annotations:27.0.1'
83-
implementation 'cz.msebera.android:httpclient:4.4.1.2'
82+
api 'cz.msebera.android:httpclient:4.4.1.2'
8483
testImplementation 'junit:junit:4.12'
8584
androidTestImplementation 'com.android.support.test:runner:1.0.1'
8685
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
8786
}
8887

89-
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
88+
apply from: '../gradle-mvn-push.gradle'

library/proguard-rules.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# limitations under the License.
1414

1515
-keep class cz.msebera.android.httpclient.** { *; }
16-
-keep class com.vorlonsoft.android.http.** { *; }
16+
-keep class com.vorlonsoft.android.http.** { *; }

library/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
1818
xmlns:tools="http://schemas.android.com/tools"
1919
package="com.vorlonsoft.android.http"
20-
android:versionCode="150"
21-
android:versionName="1.5.0"
20+
android:versionCode="151"
21+
android:versionName="1.5.1"
2222
tools:ignore="GradleOverrides">
2323

2424
<uses-permission android:name="android.permission.INTERNET" />

library/src/main/java/.gitignore

Lines changed: 0 additions & 15 deletions
This file was deleted.

library/src/main/java/com/.gitignore

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)