diff --git a/build.sbt b/build.sbt index 152e42b..86fe157 100644 --- a/build.sbt +++ b/build.sbt @@ -1,25 +1,53 @@ -inThisBuild(List( - organization := "in.rcard", - homepage := Some(url("https://github.com/rcardin")), - // Alternatively License.Apache2 see https://github.com/sbt/librarymanagement/blob/develop/core/src/main/scala/sbt/librarymanagement/License.scala - licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), - developers := List( - Developer( - "rcardin", - "Riccardo Cardin", - "riccardo DOT cardin AT gmail.com", - url("https://github.com/rcardin/raise4s") +inThisBuild( + List( + organization := "in.rcard", + homepage := Some(url("https://github.com/rcardin")), + licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), + developers := List( + Developer( + "rcardin", + "Riccardo Cardin", + "riccardo DOT cardin AT gmail.com", + url("https://github.com/rcardin/raise4s") + ) ) ) -)) +) ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org" -sonatypeRepository := "https://s01.oss.sonatype.org/service/local" +sonatypeRepository := "https://s01.oss.sonatype.org/service/local" -name := "raise4s" -//version := "0.0.1-SNAPSHOT" -scalaVersion := "3.4.1" +lazy val core = project + .settings( + name := "raise4s", + libraryDependencies ++= commonDependencies + ) + +lazy val ox = project + .settings( + name := "raise4s-ox", + libraryDependencies ++= commonDependencies ++ Seq( + dependencies.ox + ) + ) + .dependsOn( + core + ) + +ThisBuild / scalaVersion := "3.4.1" + +lazy val dependencies = + new { + val scalatestVersion = "3.2.17" + val oxVersion = "0.1.0" + val ox = "com.softwaremill.ox" %% "core" % oxVersion + val scalatest = "org.scalatest" %% "scalatest" % scalatestVersion + } + +lazy val commonDependencies = Seq( + dependencies.scalatest % Test +) libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.2.17" % Test -) \ No newline at end of file +) diff --git a/src/main/scala/in/rcard/raise4s/Builders.scala b/core/src/main/scala/in/rcard/raise4s/Builders.scala similarity index 100% rename from src/main/scala/in/rcard/raise4s/Builders.scala rename to core/src/main/scala/in/rcard/raise4s/Builders.scala diff --git a/src/main/scala/in/rcard/raise4s/Fold.scala b/core/src/main/scala/in/rcard/raise4s/Fold.scala similarity index 100% rename from src/main/scala/in/rcard/raise4s/Fold.scala rename to core/src/main/scala/in/rcard/raise4s/Fold.scala diff --git a/src/main/scala/in/rcard/raise4s/Raise.scala b/core/src/main/scala/in/rcard/raise4s/Raise.scala similarity index 100% rename from src/main/scala/in/rcard/raise4s/Raise.scala rename to core/src/main/scala/in/rcard/raise4s/Raise.scala diff --git a/src/test/scala/in/rcard/raise4s/BuildersSpec.scala b/core/src/test/scala/in/rcard/raise4s/BuildersSpec.scala similarity index 100% rename from src/test/scala/in/rcard/raise4s/BuildersSpec.scala rename to core/src/test/scala/in/rcard/raise4s/BuildersSpec.scala diff --git a/src/test/scala/in/rcard/raise4s/FoldSpec.scala b/core/src/test/scala/in/rcard/raise4s/FoldSpec.scala similarity index 100% rename from src/test/scala/in/rcard/raise4s/FoldSpec.scala rename to core/src/test/scala/in/rcard/raise4s/FoldSpec.scala diff --git a/src/test/scala/in/rcard/raise4s/RaiseSpec.scala b/core/src/test/scala/in/rcard/raise4s/RaiseSpec.scala similarity index 100% rename from src/test/scala/in/rcard/raise4s/RaiseSpec.scala rename to core/src/test/scala/in/rcard/raise4s/RaiseSpec.scala diff --git a/project/build.properties b/project/build.properties index c8fcab5..04267b1 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.2 +sbt.version=1.9.9