diff options
author | adamw <adam@warski.org> | 2017-06-29 17:24:46 +0200 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-06-29 17:24:46 +0200 |
commit | 034c40595f217ef1f11ca351666a03aa08976b81 (patch) | |
tree | 50ce45e9213120f7e6f74620c6b1eb4b3ffee86b /build.sbt | |
download | sttp-034c40595f217ef1f11ca351666a03aa08976b81.tar.gz sttp-034c40595f217ef1f11ca351666a03aa08976b81.tar.bz2 sttp-034c40595f217ef1f11ca351666a03aa08976b81.zip |
Initital draft
Diffstat (limited to 'build.sbt')
-rw-r--r-- | build.sbt | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..9126330 --- /dev/null +++ b/build.sbt @@ -0,0 +1,80 @@ +import scalariform.formatter.preferences._ + +lazy val commonSettings = scalariformSettings ++ Seq( + organization := "com.softwaremill.sttp", + version := "0.1", + scalaVersion := "2.12.2", + crossScalaVersions := Seq(scalaVersion.value, "2.11.8"), + scalacOptions ++= Seq("-unchecked", "-deprecation"), + ScalariformKeys.preferences := ScalariformKeys.preferences.value + .setPreference(DoubleIndentClassDeclaration, true) + .setPreference(PreserveSpaceBeforeArguments, true) + .setPreference(CompactControlReadability, true) + .setPreference(SpacesAroundMultiImports, false), + // Sonatype OSS deployment + publishTo := { + val nexus = "https://oss.sonatype.org/" + val (name, url) = if (isSnapshot.value) ("snapshots", nexus + "content/repositories/snapshots") + else ("releases", nexus + "service/local/staging/deploy/maven2") + Some(name at url) + }, + credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"), + publishMavenStyle := true, + pomIncludeRepository := { _ => false }, + pomExtra := ( + <scm> + <url>git@github.com/softwaremill/sttp.git</url> + <connection>scm:git:git@github.com/softwaremill/sttp.git</connection> + </scm> + <developers> + <developer> + <id>adamw</id> + <name>Adam Warski</name> + <url>http://www.warski.org</url> + </developer> + </developers> + ), + licenses := ("Apache2", new java.net.URL("http://www.apache.org/licenses/LICENSE-2.0.txt")) :: Nil, + homepage := Some(new java.net.URL("http://softwaremill.com/open-source")) +) + +val akkaHttpVersion = "10.0.9" +val akkaHttp = "com.typesafe.akka" %% "akka-http" % akkaHttpVersion + +val scalaTest = "org.scalatest" %% "scalatest" % "3.0.3" % "test" + +lazy val rootProject = (project in file(".")) + .settings(commonSettings: _*) + .settings( + publishArtifact := false, + name := "sttp") + .aggregate(core, akkaHttpHandler, tests) + +lazy val core: Project = (project in file("core")) + .settings(commonSettings: _*) + .settings( + name := "core", + libraryDependencies ++= Seq( + "org.scalacheck" %% "scalacheck" % "1.13.5" % "test", + scalaTest + ) + ) + +lazy val akkaHttpHandler: Project = (project in file("akka-http-handler")) + .settings(commonSettings: _*) + .settings( + name := "akka-http-handler", + libraryDependencies ++= Seq( + akkaHttp + ) + ) dependsOn(core) + +lazy val tests: Project = (project in file("tests")) + .settings(commonSettings: _*) + .settings( + name := "tests", + libraryDependencies ++= Seq( + akkaHttp, + scalaTest + ) + ) dependsOn(core, akkaHttpHandler)
\ No newline at end of file |