Skip to content

Commit df7cd25

Browse files
committed
add root project settings
1 parent 58c1d4c commit df7cd25

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

project/Build.scala

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Keys._
44
object ScalaOAuth2Build extends Build {
55

66
lazy val _organization = "com.nulab-inc"
7-
lazy val _version = "0.7.0"
7+
lazy val _version = "0.7.1-SNAPSHOT"
88
def _playVersion(version: String) = version match {
99
case "2.11.0" => "2.3.0-RC1"
1010
case _ => "2.2.3"
@@ -17,48 +17,50 @@ object ScalaOAuth2Build extends Build {
1717
"org.scalatest" %% "scalatest" % "2.1.6" % "test"
1818
)
1919

20+
lazy val scalaOAuth2ProviderSettings = Defaults.defaultSettings ++ Seq(
21+
organization := _organization,
22+
version := _version,
23+
scalaVersion := _scalaVersion,
24+
crossScalaVersions := _crossScalaVersions,
25+
scalacOptions ++= _scalacOptions,
26+
publishTo <<= version { (v: String) => _publishTo(v) },
27+
publishMavenStyle := true,
28+
publishArtifact in Test := false,
29+
pomIncludeRepository := { x => false },
30+
pomExtra := _pomExtra
31+
)
32+
33+
lazy val root = Project(
34+
id = "scala-oauth2-provider",
35+
base = file("."),
36+
settings = scalaOAuth2ProviderSettings ++ Seq(
37+
name := "scala-oauth2-core",
38+
description := "OAuth 2.0 server-side implementation written in Scala"
39+
)
40+
).aggregate(scalaOAuth2Core, play2OAuth2Provider)
41+
2042
lazy val scalaOAuth2Core = Project(
2143
id = "scala-oauth2-core",
2244
base = file("scala-oauth2-core"),
23-
settings = Defaults.defaultSettings ++ Seq(
24-
organization := _organization,
45+
settings = scalaOAuth2ProviderSettings ++ Seq(
2546
name := "scala-oauth2-core",
2647
description := "OAuth 2.0 server-side implementation written in Scala",
27-
version := _version,
28-
scalaVersion := _scalaVersion,
29-
crossScalaVersions := _crossScalaVersions,
30-
scalacOptions ++= _scalacOptions,
3148
libraryDependencies ++= Seq(
3249
"commons-codec" % "commons-codec" % "1.8"
33-
) ++ commonDependenciesInTestScope,
34-
publishTo <<= version { (v: String) => _publishTo(v) },
35-
publishMavenStyle := true,
36-
publishArtifact in Test := false,
37-
pomIncludeRepository := { x => false },
38-
pomExtra := _pomExtra
50+
) ++ commonDependenciesInTestScope
3951
)
4052
)
4153

4254
lazy val play2OAuth2Provider = Project(
4355
id = "play2-oauth2-provider",
4456
base = file("play2-oauth2-provider"),
45-
settings = Defaults.defaultSettings ++ Seq(
46-
organization := _organization,
57+
settings = scalaOAuth2ProviderSettings ++ Seq(
4758
name := "play2-oauth2-provider",
4859
description := "Support scala-oauth2-core library on Playframework Scala",
49-
version := _version,
50-
scalaVersion := _scalaVersion,
51-
crossScalaVersions := _crossScalaVersions,
52-
scalacOptions ++= _scalacOptions,
5360
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
5461
libraryDependencies ++= Seq(
5562
"com.typesafe.play" %% "play" % _playVersion(scalaVersion.value) % "provided"
56-
) ++ commonDependenciesInTestScope,
57-
publishTo <<= version { (v: String) => _publishTo(v) },
58-
publishMavenStyle := true,
59-
publishArtifact in Test := false,
60-
pomIncludeRepository := { x => false },
61-
pomExtra := _pomExtra
63+
) ++ commonDependenciesInTestScope
6264
)
6365
) dependsOn(scalaOAuth2Core)
6466

0 commit comments

Comments
 (0)