Add build files for Gradle and SBT

This commit is contained in:
xhh
2015-09-01 11:20:44 +08:00
parent 2fd8b8ff16
commit 3112e4ad06
5 changed files with 98 additions and 2 deletions

View File

@@ -163,9 +163,13 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
// library-specific files
if ("okhttp-gson".equals(getLibrary())) {
// the "okhttp-gson" library template requires "ApiCallback.mustache"
// and does not require "TypeRef.mustache"
// the "okhttp-gson" library template requires "ApiCallback.mustache" for async call
supportingFiles.add(new SupportingFile("ApiCallback.mustache", invokerFolder, "ApiCallback.java"));
// "build.gradle" is for development with Gradle
supportingFiles.add(new SupportingFile("build.gradle.mustache", "", "build.gradle"));
// "build.sbt" is for development with SBT
supportingFiles.add(new SupportingFile("build.sbt.mustache", "", "build.sbt"));
// and does not require "TypeRef.mustache"
} else {
supportingFiles.add(new SupportingFile("TypeRef.mustache", invokerFolder, "TypeRef.java"));
}