Skip to content

Commit 3f4589c

Browse files
authored
Use build.sbt (#106)
1 parent c33fcc4 commit 3f4589c

File tree

2 files changed

+96
-111
lines changed

2 files changed

+96
-111
lines changed

build.sbt

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
val oauth2ProviderVersion = "0.18.1-SNAPSHOT"
2+
val playVersion = "2.5.6"
3+
val akkaVersion = "2.4.7"
4+
val commonDependenciesInTestScope = Seq(
5+
"org.scalatest" %% "scalatest" % "3.0.0" % "test",
6+
"ch.qos.logback" % "logback-classic" % "1.1.7" % "test"
7+
)
8+
9+
lazy val scalaOAuth2ProviderSettings =
10+
Defaults.coreDefaultSettings ++
11+
scalariformSettings ++
12+
Seq(
13+
organization := "com.nulab-inc",
14+
version := oauth2ProviderVersion,
15+
scalaVersion := "2.11.8",
16+
crossScalaVersions := Seq("2.11.8"),
17+
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature"),
18+
publishTo <<= version { (v: String) =>
19+
val nexus = "https://oss.sonatype.org/"
20+
if (v.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots")
21+
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
22+
},
23+
publishMavenStyle := true,
24+
publishArtifact in Test := false,
25+
pomIncludeRepository := { x => false },
26+
pomExtra := <url>https://github.com/nulab/scala-oauth2-provider</url>
27+
<licenses>
28+
<license>
29+
<name>MIT License</name>
30+
<url>http://www.opensource.org/licenses/mit-license.php</url>
31+
<distribution>repo</distribution>
32+
</license>
33+
</licenses>
34+
<scm>
35+
<url>https://github.com/nulab/scala-oauth2-provider</url>
36+
<connection>scm:git:git@github.com:nulab/scala-oauth2-provider.git</connection>
37+
</scm>
38+
<developers>
39+
<developer>
40+
<id>tsuyoshizawa</id>
41+
<name>Tsuyoshi Yoshizawa</name>
42+
<url>https://github.com/tsuyoshizawa</url>
43+
</developer>
44+
</developers>
45+
)
46+
47+
lazy val root = Project(
48+
id = "scala-oauth2-provider",
49+
base = file("."),
50+
settings = scalaOAuth2ProviderSettings ++ Seq(
51+
name := "scala-oauth2-provider",
52+
description := "OAuth 2.0 server-side implementation written in Scala"
53+
)
54+
).aggregate(scalaOAuth2Core, play2OAuth2Provider, akkahttpOAuth2Provider)
55+
56+
lazy val scalaOAuth2Core = Project(
57+
id = "scala-oauth2-core",
58+
base = file("scala-oauth2-core"),
59+
settings = scalaOAuth2ProviderSettings ++ Seq(
60+
name := "scala-oauth2-core",
61+
description := "OAuth 2.0 server-side implementation written in Scala",
62+
libraryDependencies ++= commonDependenciesInTestScope
63+
)
64+
)
65+
66+
lazy val play2OAuth2Provider = Project(
67+
id = "play2-oauth2-provider",
68+
base = file("play2-oauth2-provider"),
69+
settings = scalaOAuth2ProviderSettings ++ Seq(
70+
name := "play2-oauth2-provider",
71+
description := "Support scala-oauth2-core library on Playframework Scala",
72+
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/maven-releases/",
73+
libraryDependencies ++= Seq(
74+
"com.typesafe.play" %% "play" % playVersion % "provided",
75+
"com.typesafe.play" %% "play-test" % playVersion % "test"
76+
) ++ commonDependenciesInTestScope
77+
)
78+
) dependsOn (scalaOAuth2Core % "compile->compile;test->test")
79+
80+
lazy val akkahttpOAuth2Provider = Project(
81+
id = "akka-http-oauth2-provider",
82+
base = file("akka-http-oauth2-provider"),
83+
settings = scalaOAuth2ProviderSettings ++ Seq(
84+
name := "akka-http-oauth2-provider",
85+
description := "Support scala-oauth2-core library on akka-http",
86+
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/maven-releases/",
87+
libraryDependencies ++= Seq(
88+
"com.typesafe.akka" %% "akka-http-experimental" % akkaVersion,
89+
"com.typesafe.akka" %% "akka-http-core" % akkaVersion,
90+
"com.typesafe.akka" %% "akka-http-testkit" % akkaVersion,
91+
"com.typesafe.akka" %% "akka-http-spray-json-experimental" % akkaVersion,
92+
"com.typesafe.akka" %% "akka-actor" % akkaVersion
93+
) ++ commonDependenciesInTestScope
94+
)
95+
) dependsOn (scalaOAuth2Core % "compile->compile;test->test")
96+

project/Build.scala

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)