Merge pull request #3219 from wing328/android_gradle_update

[Android][Volley] add http client dependency to android volley
This commit is contained in:
wing328 2016-06-27 11:59:42 +08:00 committed by GitHub
commit bee05f0086
19 changed files with 43 additions and 27 deletions

View File

@ -59,8 +59,9 @@ android {
ext {
swagger_annotations_version = "1.5.0"
gson_version = "2.3.1"
httpclient_version = "4.5.2"
httpmime_version = "4.5.2"
httpcore_version = "4.4.4"
httpclient_version = "4.3.3"
volley_version = "1.0.19"
junit_version = "4.12"
robolectric_version = "3.0"
@ -71,7 +72,8 @@ dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "com.google.code.gson:gson:$gson_version"
compile "org.apache.httpcomponents:httpcore:$httpcore_version"
compile "org.apache.httpcomponents:httpmime:$httpclient_version"
compile "org.apache.httpcomponents:httpmime:$httpmime_version"
compile "org.apache.httpcomponents:httpclient-android:$httpclient_version"
compile "com.mcxiaoke.volley:library:${volley_version}@aar"
testCompile "junit:junit:$junit_version"
testCompile "org.robolectric:robolectric:${robolectric_version}"

View File

@ -16,6 +16,11 @@
<artifactId>httpcore</artifactId>
<version>${httpcomponents-httpcore-version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-android</artifactId>
<version>${httpcomponents-httpclient-version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
@ -54,6 +59,7 @@
<swagger-annotations-version>1.5.8</swagger-annotations-version>
<httpcomponents-httpcore-version>4.4.4</httpcomponents-httpcore-version>
<httpcomponents-httpmime-version>4.5.2</httpcomponents-httpmime-version>
<httpcomponents-httpclient-version>4.3.3</httpcomponents-httpclient-version>
<google-code-gson-version>2.6.2</google-code-gson-version>
<volley-library-version>1.0.19</volley-library-version>
<android-platform-version>4.1.1.4</android-platform-version>

View File

@ -569,8 +569,8 @@
<modules>
<!-- run ruby test first which has a random delay script to
avoid issues with running 2 CI jobs in parallel. -->
<module>samples/client/petstore/python</module>
<module>samples/client/petstore/ruby</module>
<module>samples/client/petstore/python</module>
<module>samples/client/petstore/typescript-fetch/tests/default</module>
<module>samples/client/petstore/typescript-fetch/builds/default</module>
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>

View File

@ -36,4 +36,4 @@ captures/
*.iml
# Keystore files
*.jks
*.jks

View File

@ -116,6 +116,12 @@ Class | Method | HTTP request | Description
## Documentation for Authorization
Authentication schemes defined for the API:
### api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header
### petstore_auth
- **Type**: OAuth
@ -125,12 +131,6 @@ Authentication schemes defined for the API:
- write:pets: modify pets in your account
- read:pets: read your pets
### api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header
## Recommendation

View File

@ -53,8 +53,9 @@ android {
ext {
swagger_annotations_version = "1.5.0"
gson_version = "2.3.1"
httpclient_version = "4.5.2"
httpmime_version = "4.5.2"
httpcore_version = "4.4.4"
httpclient_version = "4.3.3"
volley_version = "1.0.19"
junit_version = "4.12"
robolectric_version = "3.0"
@ -65,7 +66,8 @@ dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "com.google.code.gson:gson:$gson_version"
compile "org.apache.httpcomponents:httpcore:$httpcore_version"
compile "org.apache.httpcomponents:httpmime:$httpclient_version"
compile "org.apache.httpcomponents:httpmime:$httpmime_version"
compile "org.apache.httpcomponents:httpclient-android:$httpclient_version"
compile "com.mcxiaoke.volley:library:${volley_version}@aar"
testCompile "junit:junit:$junit_version"
testCompile "org.robolectric:robolectric:${robolectric_version}"

View File

@ -1,4 +1,4 @@
#Mon May 16 21:00:31 CST 2016
#Mon May 16 21:00:11 CST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

View File

@ -16,6 +16,11 @@
<artifactId>httpcore</artifactId>
<version>${httpcomponents-httpcore-version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-android</artifactId>
<version>${httpcomponents-httpclient-version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
@ -54,6 +59,7 @@
<swagger-annotations-version>1.5.8</swagger-annotations-version>
<httpcomponents-httpcore-version>4.4.4</httpcomponents-httpcore-version>
<httpcomponents-httpmime-version>4.5.2</httpcomponents-httpmime-version>
<httpcomponents-httpclient-version>4.3.3</httpcomponents-httpclient-version>
<google-code-gson-version>2.6.2</google-code-gson-version>
<volley-library-version>1.0.19</volley-library-version>
<android-platform-version>4.1.1.4</android-platform-version>

View File

@ -14,16 +14,16 @@ public class ApiException extends Exception {
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
}

View File

@ -47,7 +47,7 @@ public class Category {
(name == null ? category.name == null : name.equals(category.name));
}
@Override
@Override
public int hashCode() {
int result = 17;
result = 31 * result + (id == null ? 0: id.hashCode());

View File

@ -104,7 +104,7 @@ public class Order {
(complete == null ? order.complete == null : complete.equals(order.complete));
}
@Override
@Override
public int hashCode() {
int result = 17;
result = 31 * result + (id == null ? 0: id.hashCode());

View File

@ -106,7 +106,7 @@ public class Pet {
(status == null ? pet.status == null : status.equals(pet.status));
}
@Override
@Override
public int hashCode() {
int result = 17;
result = 31 * result + (id == null ? 0: id.hashCode());

View File

@ -47,7 +47,7 @@ public class Tag {
(name == null ? tag.name == null : name.equals(tag.name));
}
@Override
@Override
public int hashCode() {
int result = 17;
result = 31 * result + (id == null ? 0: id.hashCode());

View File

@ -126,7 +126,7 @@ public class User {
(userStatus == null ? user.userStatus == null : userStatus.equals(user.userStatus));
}
@Override
@Override
public int hashCode() {
int result = 17;
result = 31 * result + (id == null ? 0: id.hashCode());

View File

@ -89,4 +89,4 @@ public class DeleteRequest extends Request<String> {
return headers;
}
}
}

View File

@ -36,4 +36,4 @@ public class GetRequest extends StringRequest{
return headers;
}
}
}

View File

@ -89,4 +89,4 @@ public class PatchRequest extends Request<String> {
return headers;
}
}
}

View File

@ -89,4 +89,4 @@ public class PostRequest extends Request<String> {
return headers;
}
}
}

View File

@ -89,4 +89,4 @@ public class PutRequest extends Request<String> {
return headers;
}
}
}