Skip to content

Commit bee05f0

Browse files
authored
Merge pull request #3219 from wing328/android_gradle_update
[Android][Volley] add http client dependency to android volley
2 parents b19527d + 7f5b391 commit bee05f0

File tree

19 files changed

+43
-27
lines changed

19 files changed

+43
-27
lines changed

modules/swagger-codegen/src/main/resources/android/libraries/volley/build.mustache

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ android {
5959
ext {
6060
swagger_annotations_version = "1.5.0"
6161
gson_version = "2.3.1"
62-
httpclient_version = "4.5.2"
62+
httpmime_version = "4.5.2"
6363
httpcore_version = "4.4.4"
64+
httpclient_version = "4.3.3"
6465
volley_version = "1.0.19"
6566
junit_version = "4.12"
6667
robolectric_version = "3.0"
@@ -71,7 +72,8 @@ dependencies {
7172
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
7273
compile "com.google.code.gson:gson:$gson_version"
7374
compile "org.apache.httpcomponents:httpcore:$httpcore_version"
74-
compile "org.apache.httpcomponents:httpmime:$httpclient_version"
75+
compile "org.apache.httpcomponents:httpmime:$httpmime_version"
76+
compile "org.apache.httpcomponents:httpclient-android:$httpclient_version"
7577
compile "com.mcxiaoke.volley:library:${volley_version}@aar"
7678
testCompile "junit:junit:$junit_version"
7779
testCompile "org.robolectric:robolectric:${robolectric_version}"

modules/swagger-codegen/src/main/resources/android/libraries/volley/pom.mustache

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
<artifactId>httpcore</artifactId>
1717
<version>${httpcomponents-httpcore-version}</version>
1818
</dependency>
19+
<dependency>
20+
<groupId>org.apache.httpcomponents</groupId>
21+
<artifactId>httpclient-android</artifactId>
22+
<version>${httpcomponents-httpclient-version}</version>
23+
</dependency>
1924
<dependency>
2025
<groupId>org.apache.httpcomponents</groupId>
2126
<artifactId>httpmime</artifactId>
@@ -54,6 +59,7 @@
5459
<swagger-annotations-version>1.5.8</swagger-annotations-version>
5560
<httpcomponents-httpcore-version>4.4.4</httpcomponents-httpcore-version>
5661
<httpcomponents-httpmime-version>4.5.2</httpcomponents-httpmime-version>
62+
<httpcomponents-httpclient-version>4.3.3</httpcomponents-httpclient-version>
5763
<google-code-gson-version>2.6.2</google-code-gson-version>
5864
<volley-library-version>1.0.19</volley-library-version>
5965
<android-platform-version>4.1.1.4</android-platform-version>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,8 @@
569569
<modules>
570570
<!-- run ruby test first which has a random delay script to
571571
avoid issues with running 2 CI jobs in parallel. -->
572-
<module>samples/client/petstore/python</module>
573572
<module>samples/client/petstore/ruby</module>
573+
<module>samples/client/petstore/python</module>
574574
<module>samples/client/petstore/typescript-fetch/tests/default</module>
575575
<module>samples/client/petstore/typescript-fetch/builds/default</module>
576576
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>

samples/client/petstore/android/volley/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ captures/
3636
*.iml
3737

3838
# Keystore files
39-
*.jks
39+
*.jks

samples/client/petstore/android/volley/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ Class | Method | HTTP request | Description
116116
## Documentation for Authorization
117117

118118
Authentication schemes defined for the API:
119+
### api_key
120+
121+
- **Type**: API key
122+
- **API key parameter name**: api_key
123+
- **Location**: HTTP header
124+
119125
### petstore_auth
120126

121127
- **Type**: OAuth
@@ -125,12 +131,6 @@ Authentication schemes defined for the API:
125131
- write:pets: modify pets in your account
126132
- read:pets: read your pets
127133

128-
### api_key
129-
130-
- **Type**: API key
131-
- **API key parameter name**: api_key
132-
- **Location**: HTTP header
133-
134134

135135
## Recommendation
136136

samples/client/petstore/android/volley/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ android {
5353
ext {
5454
swagger_annotations_version = "1.5.0"
5555
gson_version = "2.3.1"
56-
httpclient_version = "4.5.2"
56+
httpmime_version = "4.5.2"
5757
httpcore_version = "4.4.4"
58+
httpclient_version = "4.3.3"
5859
volley_version = "1.0.19"
5960
junit_version = "4.12"
6061
robolectric_version = "3.0"
@@ -65,7 +66,8 @@ dependencies {
6566
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
6667
compile "com.google.code.gson:gson:$gson_version"
6768
compile "org.apache.httpcomponents:httpcore:$httpcore_version"
68-
compile "org.apache.httpcomponents:httpmime:$httpclient_version"
69+
compile "org.apache.httpcomponents:httpmime:$httpmime_version"
70+
compile "org.apache.httpcomponents:httpclient-android:$httpclient_version"
6971
compile "com.mcxiaoke.volley:library:${volley_version}@aar"
7072
testCompile "junit:junit:$junit_version"
7173
testCompile "org.robolectric:robolectric:${robolectric_version}"

samples/client/petstore/android/volley/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Mon May 16 21:00:31 CST 2016
1+
#Mon May 16 21:00:11 CST 2016
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME

samples/client/petstore/android/volley/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
<artifactId>httpcore</artifactId>
1717
<version>${httpcomponents-httpcore-version}</version>
1818
</dependency>
19+
<dependency>
20+
<groupId>org.apache.httpcomponents</groupId>
21+
<artifactId>httpclient-android</artifactId>
22+
<version>${httpcomponents-httpclient-version}</version>
23+
</dependency>
1924
<dependency>
2025
<groupId>org.apache.httpcomponents</groupId>
2126
<artifactId>httpmime</artifactId>
@@ -54,6 +59,7 @@
5459
<swagger-annotations-version>1.5.8</swagger-annotations-version>
5560
<httpcomponents-httpcore-version>4.4.4</httpcomponents-httpcore-version>
5661
<httpcomponents-httpmime-version>4.5.2</httpcomponents-httpmime-version>
62+
<httpcomponents-httpclient-version>4.3.3</httpcomponents-httpclient-version>
5763
<google-code-gson-version>2.6.2</google-code-gson-version>
5864
<volley-library-version>1.0.19</volley-library-version>
5965
<android-platform-version>4.1.1.4</android-platform-version>

samples/client/petstore/android/volley/src/main/java/io/swagger/client/ApiException.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ public ApiException(int code, String message) {
1414
public int getCode() {
1515
return code;
1616
}
17-
17+
1818
public void setCode(int code) {
1919
this.code = code;
2020
}
21-
21+
2222
public String getMessage() {
2323
return message;
2424
}
25-
25+
2626
public void setMessage(String message) {
2727
this.message = message;
2828
}
29-
}
29+
}

samples/client/petstore/android/volley/src/main/java/io/swagger/client/model/Category.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public boolean equals(Object o) {
4747
(name == null ? category.name == null : name.equals(category.name));
4848
}
4949

50-
@Override
50+
@Override
5151
public int hashCode() {
5252
int result = 17;
5353
result = 31 * result + (id == null ? 0: id.hashCode());

0 commit comments

Comments
 (0)