From 3629fbac44d7e36776f411136d70c0421dd779b9 Mon Sep 17 00:00:00 2001 From: zhenjun115 Date: Sat, 7 May 2016 14:12:19 +0800 Subject: [PATCH] add pom.mustache for android api client(using volley HTTP library);update android api client samples(using volley HTTP library); --- .../languages/AndroidClientCodegen.java | 2 +- .../android/libraries/volley/pom.mustache | 48 +++++++++++++++++++ .../client/petstore/android/volley/pom.xml | 17 +++++-- 3 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 modules/swagger-codegen/src/main/resources/android/libraries/volley/pom.mustache diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AndroidClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AndroidClientCodegen.java index c0bead5c695..324453991e0 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AndroidClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AndroidClientCodegen.java @@ -317,7 +317,7 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi } private void addSupportingFilesForVolley() { - // supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml")); + supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml")); // supportingFiles.add(new SupportingFile("settings.gradle.mustache", "", "settings.gradle")); supportingFiles.add(new SupportingFile("build.mustache", "", "build.gradle")); supportingFiles.add(new SupportingFile("manifest.mustache", projectFolder, "AndroidManifest.xml")); diff --git a/modules/swagger-codegen/src/main/resources/android/libraries/volley/pom.mustache b/modules/swagger-codegen/src/main/resources/android/libraries/volley/pom.mustache new file mode 100644 index 00000000000..09f55a743a7 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/android/libraries/volley/pom.mustache @@ -0,0 +1,48 @@ + + + 4.0.0 + io.swagger + volley + 1.0.0 + + + io.swagger + swagger-annotations + ${swagger-annotations-version} + compile + + + org.apache.httpcomponents + httpcore + ${httpcomponents-httpcore-version} + compile + + + org.apache.httpcomponents + httpmime + ${httpcomponents-httpmime-version} + compile + + + com.google.code.gson + gson + ${google-code-gson-version} + compile + + + com.mcxiaoke.volley + library + ${volley-library-version} + aar + compile + + + + 1.5.0 + 4.4.4 + 4.5.2 + 2.3.1 + 1.0.19 + + diff --git a/samples/client/petstore/android/volley/pom.xml b/samples/client/petstore/android/volley/pom.xml index 2a3b8ef2f96..09f55a743a7 100644 --- a/samples/client/petstore/android/volley/pom.xml +++ b/samples/client/petstore/android/volley/pom.xml @@ -9,33 +9,40 @@ io.swagger swagger-annotations - 1.5.0 + ${swagger-annotations-version} compile org.apache.httpcomponents httpcore - 4.4.4 + ${httpcomponents-httpcore-version} compile org.apache.httpcomponents httpmime - 4.5.2 + ${httpcomponents-httpmime-version} compile com.google.code.gson gson - 2.3.1 + ${google-code-gson-version} compile com.mcxiaoke.volley library - 1.0.19 + ${volley-library-version} aar compile + + 1.5.0 + 4.4.4 + 4.5.2 + 2.3.1 + 1.0.19 +