diff --git a/build.sbt b/build.sbt new file mode 100644 index 00000000..a9534fb8 --- /dev/null +++ b/build.sbt @@ -0,0 +1,67 @@ +import sbt._ +import Keys._ + +val Specs2Version = "3.9.1" + +val commonSettings = Seq( + version := "0.27.5-SNAPSHOT", + credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"), + organization := "com.rockymadden.stringmetric", + pomExtra := + http://rockymadden.com/stringmetric/ + + + MIT + repo + + + + git@github.com:rockymadden/stringmetric.git + scm:git:git@github.com:rockymadden/stringmetric.git + + + + rockymadden + Rocky Madden + http://rockymadden.com/ + + , + publishMavenStyle := true, + publishTo := Some( + "Sonatype" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"), + resolvers ++= Seq(DefaultMavenRepository), + scalaVersion := "2.11.11", + crossScalaVersions := Seq("2.12.3", "2.11.11", "2.10.4") +) + +lazy val stringmetric = project + .in(file(".")) + .settings(commonSettings) + .settings( name := "stringmetric") + .aggregate(core.jvm, core.js, cli) + +lazy val core = crossProject + .crossType(CrossType.Pure) + .in(file("core")) + .settings(commonSettings) + .settings( + name := "stringmetric-core" + ) + .jvmSettings( + libraryDependencies ++= Seq( + "org.specs2" %% "specs2-junit" % Specs2Version % "test") + ) + +lazy val coreJs = core.js + +lazy val coreJvm = core.jvm + +lazy val cli: Project = project + .in(file("cli")) + .settings(commonSettings) + .settings( + libraryDependencies ++= Seq( + "org.specs2" %% "specs2-junit" % Specs2Version % "test"), + name := "stringmetric-cli" + ) + .dependsOn(core.jvm) diff --git a/project/build.properties b/project/build.properties index 37b489cb..64317fda 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.1 +sbt.version=0.13.15 diff --git a/project/build.scala b/project/build.scala deleted file mode 100644 index e13649b7..00000000 --- a/project/build.scala +++ /dev/null @@ -1,52 +0,0 @@ -import sbt._ -import Keys._ - -object CoreBuild extends Build { - lazy val root = Project("stringmetric", file("."), - settings = Defaults.defaultSettings ++ Seq( - credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"), - name := "stringmetric", - organization := "com.rockymadden.stringmetric", - pomExtra := - http://rockymadden.com/stringmetric/ - - - MIT - repo - - - - git@github.com:rockymadden/stringmetric.git - scm:git:git@github.com:rockymadden/stringmetric.git - - - - rockymadden - Rocky Madden - http://rockymadden.com/ - - , - publishMavenStyle := true, - publishTo := Some("Sonatype" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"), - resolvers ++= Seq(DefaultMavenRepository), - scalaVersion := "2.11.1", - crossScalaVersions := Seq("2.11.1", "2.10.4"), - crossVersion := CrossVersion.binary, - version := "0.27.4" - ) - ).aggregate(core, cli) - - lazy val core: Project = Project("core", file("core"), - settings = (root.settings: Seq[sbt.Def.Setting[_]]) ++ Seq( - libraryDependencies ++= Seq("org.specs2" %% "specs2" % "2.3.12" % "test"), - name := "stringmetric-core" - ) - ) - - lazy val cli: Project = Project("cli", file("cli"), - settings = (root.settings: Seq[sbt.Def.Setting[_]]) ++ Seq( - libraryDependencies ++= Seq("org.specs2" %% "specs2" % "2.3.12" % "test"), - name := "stringmetric-cli" - ) - ).dependsOn(core) -} diff --git a/project/plugins.sbt b/project/plugins.sbt index 9cf23fb8..6eb6504c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1 +1,3 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.18") +addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC8")