diff --git a/build.sbt b/build.sbt index 36d4953..bea7ca9 100644 --- a/build.sbt +++ b/build.sbt @@ -19,13 +19,17 @@ val commons = Seq( resolvers += Resolver.sonatypeRepo("releases"), scalafmtOnCompile := true, // see good explanation https://gist.github.com/djspiewak/7a81a395c461fd3a09a6941d4cd040f2 - scalacOptions += "-Ypartial-unification" + scalacOptions += "-Ypartial-unification", + organization := "one.fluence", + bintrayOrganization := Some("fluencelabs"), ) commons -lazy val core = project.settings( +lazy val crotalinae = project.in(file("core")).settings( commons, + artifact := Artifact("crotalinae"), + version := "0.0.4", libraryDependencies ++= Seq( "org.typelevel" %% "cats-core" % "1.2.0", "org.typelevel" %% "cats-free" % "1.2.0", @@ -38,9 +42,10 @@ lazy val core = project.settings( lazy val root = project .in(file(".")) - .dependsOn(core) - .aggregate(core) + .dependsOn(crotalinae) + .aggregate(crotalinae) .settings( - libraryDependencies ++= Seq("com.chuusai" %% "shapeless" % "2.3.3"), - addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full) + libraryDependencies ++= Seq("com.chuusai" %% "shapeless" % "2.3.3"), + addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full), + publishArtifact := false ) diff --git a/project/plugins.sbt b/project/plugins.sbt index f891177..407d1b8 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1 +1,3 @@ -addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.4.0") \ No newline at end of file +addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.4.0") + +addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") \ No newline at end of file diff --git a/scastie-settings.sbt_ b/scastie-settings.sbt_ new file mode 100644 index 0000000..41a509e --- /dev/null +++ b/scastie-settings.sbt_ @@ -0,0 +1,11 @@ +// use https://scastie.scala-lang.org/ +scalacOptions ++= Seq( + "-deprecation", + "-encoding", "UTF-8", + "-feature", + "-unchecked" +) +resolvers += Resolver.bintrayRepo("fluencelabs", "maven") +libraryDependencies += "org.typelevel" %% "cats-core" % "1.2.0" +libraryDependencies += "one.fluence" %% "crotalinae" % "0.0.4" +libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.3" \ No newline at end of file diff --git a/src/main/scala/fluence/Auction.scala b/src/main/scala/fluence/Auction.scala index 2246188..11ab0e6 100644 --- a/src/main/scala/fluence/Auction.scala +++ b/src/main/scala/fluence/Auction.scala @@ -1,7 +1,7 @@ package fluence -import hackethberlin._ -import hackethberlin.types._ +import fluence.hackethberlin._ +import fluence.hackethberlin.types._ import shapeless._ import Decorator._ import syntax.singleton._ @@ -51,9 +51,8 @@ object Auction extends App { for { _ <- `assert`(`<<`(`block.timestamp`, auction_end)) _ <- `assert`(`>>`(`msg.value`, highest_bid)) - _ <- `if`(`not`(`:===:`(highest_bid, `msg.value`)), { - () => - send(highest_bidder :: highest_bid :: HNil).liftF.map(_ => Void) + _ <- `if`(`not`(`:===:`(highest_bid, `msg.value`)), { () => + send(highest_bidder :: highest_bid :: HNil).liftF.map(_ => Void) }) _ <- highest_bidder :=: `msg.sender` _ <- highest_bid :=: `msg.value`