diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java index 12467f12efe..b740ba552a1 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java @@ -87,6 +87,8 @@ public class ScalaClientCodegen extends DefaultCodegen implements CodegenConfig supportingFiles.add(new SupportingFile( "gradle-wrapper.jar", gradleWrapperPackage.replace( ".", File.separator ), "gradle-wrapper.jar") ); + supportingFiles.add(new SupportingFile("build.sbt.mustache", "", "build.sbt")); + importMapping.remove("List"); importMapping.remove("Set"); importMapping.remove("Map"); diff --git a/modules/swagger-codegen/src/main/resources/scala/build.sbt.mustache b/modules/swagger-codegen/src/main/resources/scala/build.sbt.mustache new file mode 100644 index 00000000000..6a198acb832 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/scala/build.sbt.mustache @@ -0,0 +1,33 @@ +lazy val root = (project in file(".")). + settings( + version := "{{artifactVersion}}", + name := "{{artifactId}}", + organization := "{{groupId}}", + scalaVersion := "2.11.8", + + libraryDependencies ++= Seq( + "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.4.2", + "com.sun.jersey" % "jersey-core" % "1.19", + "com.sun.jersey" % "jersey-client" % "1.19", + "com.sun.jersey.contribs" % "jersey-multipart" % "1.19", + "org.jfarcand" % "jersey-ahc-client" % "1.0.5", + "io.swagger" % "swagger-core" % "1.5.8", + "joda-time" % "joda-time" % "2.2", + "org.joda" % "joda-convert" % "1.2", + "org.scalatest" %% "scalatest" % "2.2.4" % "test", + "junit" % "junit" % "4.8.1" % "test" + ), + + resolvers ++= Seq( + Resolver.jcenterRepo, + Resolver.mavenLocal + ), + + scalacOptions := Seq( + "-unchecked", + "-deprecation", + "-feature" + ), + + publishArtifact in (Compile, packageDoc) := false + ) \ No newline at end of file diff --git a/samples/client/petstore/scala/build.sbt b/samples/client/petstore/scala/build.sbt new file mode 100644 index 00000000000..063b2b0d490 --- /dev/null +++ b/samples/client/petstore/scala/build.sbt @@ -0,0 +1,33 @@ +lazy val root = (project in file(".")). + settings( + version := "1.0.0", + name := "swagger-scala-client", + organization := "io.swagger", + scalaVersion := "2.11.8", + + libraryDependencies ++= Seq( + "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.4.2", + "com.sun.jersey" % "jersey-core" % "1.19", + "com.sun.jersey" % "jersey-client" % "1.19", + "com.sun.jersey.contribs" % "jersey-multipart" % "1.19", + "org.jfarcand" % "jersey-ahc-client" % "1.0.5", + "io.swagger" % "swagger-core" % "1.5.8", + "joda-time" % "joda-time" % "2.2", + "org.joda" % "joda-convert" % "1.2", + "org.scalatest" %% "scalatest" % "2.2.4" % "test", + "junit" % "junit" % "4.8.1" % "test" + ), + + resolvers ++= Seq( + Resolver.jcenterRepo, + Resolver.mavenLocal + ), + + scalacOptions := Seq( + "-unchecked", + "-deprecation", + "-feature" + ), + + publishArtifact in (Compile, packageDoc) := false + ) \ No newline at end of file