Add sbt support for feign.

This commit is contained in:
clasnake
2016-06-04 21:51:49 +08:00
parent 503fb138f5
commit 4da829315f
29 changed files with 80 additions and 26 deletions

View File

@@ -275,6 +275,8 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
gradleWrapperPackage.replace( ".", File.separator ), "gradle-wrapper.properties") );
supportingFiles.add( new SupportingFile( "gradle-wrapper.jar",
gradleWrapperPackage.replace( ".", File.separator ), "gradle-wrapper.jar") );
// "build.sbt" is for development with SBT
supportingFiles.add(new SupportingFile("build.sbt.mustache", "", "build.sbt"));
}
supportingFiles.add(new SupportingFile("auth/HttpBasicAuth.mustache", authFolder, "HttpBasicAuth.java"));
supportingFiles.add(new SupportingFile("auth/ApiKeyAuth.mustache", authFolder, "ApiKeyAuth.java"));

View File

@@ -0,0 +1,26 @@
lazy val root = (project in file(".")).
settings(
organization := "{{groupId}}",
name := "{{artifactId}}",
version := "{{artifactVersion}}",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
publishArtifact in (Compile, packageDoc) := false,
resolvers += Resolver.mavenLocal,
libraryDependencies ++= Seq(
"io.swagger" % "swagger-annotations" % "1.5.8" % "compile",
"com.netflix.feign" % "feign-core" % "8.16.0" % "compile",
"com.netflix.feign" % "feign-jackson" % "8.16.0" % "compile",
"com.netflix.feign" % "feign-slf4j" % "8.16.0" % "compile",
"com.fasterxml.jackson.core" % "jackson-core" % "2.7.0" % "compile",
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.7.0" % "compile",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.7.0" % "compile",
"com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.1.5" % "compile",
"joda-time" % "joda-time" % "2.9.3" % "compile",
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
"com.brsanthu" % "migbase64" % "2.2" % "compile",
"junit" % "junit" % "4.12" % "testCompile",
"com.novocode" % "junit-interface" % "0.10" % "test"
)
)