From c59f55942a6e0a55010dac98b9ed4a0285c43d8d Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Fri, 30 Jun 2017 17:37:57 +0900 Subject: [PATCH] sbt 0.13.17. migrate to build.sbt --- build.sbt | 82 +++++++++++++++++++++++++++++++++++ project/Build.scala | 92 ---------------------------------------- project/build.properties | 2 +- 3 files changed, 83 insertions(+), 93 deletions(-) create mode 100644 build.sbt delete mode 100644 project/Build.scala diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..c64aa50 --- /dev/null +++ b/build.sbt @@ -0,0 +1,82 @@ +lazy val _organization = "jp.t2v" +lazy val _version = "0.6.0-SNAPSHOT" + +def _publishTo(v: String) = { + val nexus = "https://oss.sonatype.org/" + if (v.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots") + else Some("releases" at nexus + "service/local/staging/deploy/maven2") +} + +lazy val _resolvers = Seq( + "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases", + "sonatype releases" at "http://oss.sonatype.org/content/repositories/releases" +) + +lazy val _scalacOptions = Seq("-unchecked") + +lazy val _pomExtra = { + https://github.com/t2v/stackable-controller + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + git@github.com:t2v/stackable-controller + scm:git:git@github.com:t2v/stackable-controller + + + + gakuzzzz + gakuzzzz + https://github.com/gakuzzzz + + +} + +val Scala211 = "2.11.7" + +lazy val core = Project( + id = "core", + base = file("core") +).settings( + organization := _organization, + name := "stackable-controller", + version := _version, + scalaVersion := Scala211, + crossScalaVersions := Scala211 :: Nil, + publishTo := _publishTo(version.value), + publishMavenStyle := true, + resolvers ++= _resolvers, + libraryDependencies ++= Seq( + "com.typesafe.play" %% "play" % play.core.PlayVersion.current % "provided" + ), + sbtPlugin := false, + scalacOptions ++= _scalacOptions, + publishMavenStyle := true, + publishArtifact in Test := false, + pomIncludeRepository := { x => false }, + pomExtra := _pomExtra +) + +lazy val sample = Project("sample", file("sample")).enablePlugins(play.sbt.PlayScala).settings( + version := _version, + scalaVersion := Scala211, + resolvers ++= _resolvers, + routesGenerator := StaticRoutesGenerator, + libraryDependencies ++= Seq( + play.sbt.Play.autoImport.jdbc, + play.sbt.Play.autoImport.specs2 % "test", + "com.typesafe.play" %% "play" % play.core.PlayVersion.current, + "org.scalikejdbc" %% "scalikejdbc" % "2.3.5", + "org.scalikejdbc" %% "scalikejdbc-config" % "2.3.5", + "org.scalikejdbc" %% "scalikejdbc-play-initializer" % "2.5.0", + "org.slf4j" % "slf4j-simple" % "[1.7,)" + ) +) dependsOn(core) + +lazy val root = Project(id = "root", base = file(".")).settings( + scalaVersion := Scala211 +).aggregate(core, sample) diff --git a/project/Build.scala b/project/Build.scala deleted file mode 100644 index 865f110..0000000 --- a/project/Build.scala +++ /dev/null @@ -1,92 +0,0 @@ -import sbt._ -import Keys._ -import play.sbt.routes.RoutesKeys.routesGenerator -import play.routes.compiler.StaticRoutesGenerator - -object StackableControllerProjects extends Build { - - lazy val _organization = "jp.t2v" - - lazy val _version = "0.6.0-SNAPSHOT" - - def _publishTo(v: String) = { - val nexus = "https://oss.sonatype.org/" - if (v.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots") - else Some("releases" at nexus + "service/local/staging/deploy/maven2") - } - - lazy val _resolvers = Seq( - "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases", - "sonatype releases" at "http://oss.sonatype.org/content/repositories/releases" - ) - - lazy val _scalacOptions = Seq("-unchecked") - - lazy val _pomExtra = { - https://github.com/t2v/stackable-controller - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html - repo - - - - git@github.com:t2v/stackable-controller - scm:git:git@github.com:t2v/stackable-controller - - - - gakuzzzz - gakuzzzz - https://github.com/gakuzzzz - - - } - - val Scala211 = "2.11.7" - - lazy val core = Project( - id = "core", - base = file("core") - ).settings( - organization := _organization, - name := "stackable-controller", - version := _version, - scalaVersion := Scala211, - crossScalaVersions := Scala211 :: Nil, - publishTo <<= version { (v: String) => _publishTo(v) }, - publishMavenStyle := true, - resolvers ++= _resolvers, - libraryDependencies ++= Seq( - "com.typesafe.play" %% "play" % play.core.PlayVersion.current % "provided" - ), - sbtPlugin := false, - scalacOptions ++= _scalacOptions, - publishMavenStyle := true, - publishArtifact in Test := false, - pomIncludeRepository := { x => false }, - pomExtra := _pomExtra - ) - - lazy val sample = Project("sample", file("sample")).enablePlugins(play.sbt.PlayScala).settings( - version := _version, - scalaVersion := Scala211, - resolvers ++= _resolvers, - routesGenerator := StaticRoutesGenerator, - libraryDependencies ++= Seq( - play.sbt.Play.autoImport.jdbc, - play.sbt.Play.autoImport.specs2 % "test", - "com.typesafe.play" %% "play" % play.core.PlayVersion.current, - "org.scalikejdbc" %% "scalikejdbc" % "2.3.5", - "org.scalikejdbc" %% "scalikejdbc-config" % "2.3.5", - "org.scalikejdbc" %% "scalikejdbc-play-initializer" % "2.5.0", - "org.slf4j" % "slf4j-simple" % "[1.7,)" - ) - ) dependsOn(core) - - lazy val root = Project(id = "root", base = file(".")).settings( - scalaVersion := Scala211 - ).aggregate(core, sample) - -} diff --git a/project/build.properties b/project/build.properties index 43b8278..133a8f1 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.11 +sbt.version=0.13.17