Skip to content

Commit

Permalink
Scala Native 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lolgab committed Aug 12, 2024
1 parent 4abcc7c commit d88c481
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.7-70-654f58
0.11.11
188 changes: 94 additions & 94 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,17 @@ trait SNUnitModule extends Common.Cross with Publish {
}
}

object `snunit-async-cats-effect` extends Cross[SNUnitAsyncCatsEffectModule](scalaVersions)
trait SNUnitAsyncCatsEffectModule extends Common.Cross with Publish {
def moduleDeps = Seq(snunit())
// object `snunit-async-cats-effect` extends Cross[SNUnitAsyncCatsEffectModule](scalaVersions)
// trait SNUnitAsyncCatsEffectModule extends Common.Cross with Publish {
// def moduleDeps = Seq(snunit())

def ivyDeps =
T {
super.ivyDeps() ++ Agg(
ivy"org.typelevel::cats-effect::${Versions.catsEffect}"
)
}
}
// def ivyDeps =
// T {
// super.ivyDeps() ++ Agg(
// ivy"org.typelevel::cats-effect::${Versions.catsEffect}"
// )
// }
// }

object `snunit-undertow` extends Cross[SNUnitUndertow](scalaVersions)
trait SNUnitUndertow extends Common.Cross with Publish {
Expand All @@ -126,61 +126,61 @@ trait SNUnitTapirModule extends Common.Cross with Publish {
def moduleDeps = Seq(snunit())
def ivyDeps = super.ivyDeps() ++ Agg(ivy"com.softwaremill.sttp.tapir::tapir-server::${Versions.tapir}")
}
object `snunit-tapir-cats-effect` extends Cross[SNUnitTapirCatsEffect](scalaVersions)
trait SNUnitTapirCatsEffect extends Common.Cross with Publish {
def moduleDeps = Seq(
`snunit-tapir`(),
`snunit-async-cats-effect`()
)
def ivyDeps = super.ivyDeps() ++ Agg(
ivy"com.softwaremill.sttp.tapir::tapir-cats-effect::${Versions.tapir}"
)
}
// object `snunit-tapir-cats-effect` extends Cross[SNUnitTapirCatsEffect](scalaVersions)
// trait SNUnitTapirCatsEffect extends Common.Cross with Publish {
// def moduleDeps = Seq(
// `snunit-tapir`(),
// `snunit-async-cats-effect`()
// )
// def ivyDeps = super.ivyDeps() ++ Agg(
// ivy"com.softwaremill.sttp.tapir::tapir-cats-effect::${Versions.tapir}"
// )
// }

object `snunit-http4s` extends Cross[SNUnitHttp4s](http4sAndScalaVersions)
trait SNUnitHttp4s extends Common.Cross with Cross.Module2[String, String] with Publish {
val http4sVersion = crossValue2
def moduleDeps = Seq(
snunit(),
`snunit-async-cats-effect`()
)
val http4sBinaryVersion = http4sVersion match {
case s"0.23.$_" => "0.23"
case s"1.$_" => "1"
}
def artifactName = s"snunit-http4s$http4sBinaryVersion"
def ivyDeps = super.ivyDeps() ++ Agg(
ivy"org.http4s::http4s-server::$http4sVersion"
)
def sources = T.sources {
super.sources() ++ Agg(PathRef(millSourcePath / s"http4s-$http4sBinaryVersion" / "src"))
}
}
// object `snunit-http4s` extends Cross[SNUnitHttp4s](http4sAndScalaVersions)
// trait SNUnitHttp4s extends Common.Cross with Cross.Module2[String, String] with Publish {
// val http4sVersion = crossValue2
// def moduleDeps = Seq(
// snunit(),
// `snunit-async-cats-effect`()
// )
// val http4sBinaryVersion = http4sVersion match {
// case s"0.23.$_" => "0.23"
// case s"1.$_" => "1"
// }
// def artifactName = s"snunit-http4s$http4sBinaryVersion"
// def ivyDeps = super.ivyDeps() ++ Agg(
// ivy"org.http4s::http4s-server::$http4sVersion"
// )
// def sources = T.sources {
// super.sources() ++ Agg(PathRef(millSourcePath / s"http4s-$http4sBinaryVersion" / "src"))
// }
// }

def caskSources = T {
val dest = T.dest
os.proc("git", "clone", "--branch", Versions.cask, "--depth", "1", "https://github.com/com-lihaoyi/cask", dest).call()
os.proc("git", "apply", T.workspace / "cask.patch").call(cwd = dest / "cask")
PathRef(dest)
}
object `snunit-cask` extends Cross[SNUnitCaskModule](scalaVersions)
trait SNUnitCaskModule extends Common.Cross with Publish {
override def generatedSources = T {
val cask = caskSources().path / "cask"
val util = cask / "util"
val scala2 = cask / "src-2"
val scala3 = cask / "src-3"
val scalaVersionSpecific = if (isScala3(crossScalaVersion)) scala3 else scala2
Seq(cask / "src", util / "src", scalaVersionSpecific).map(PathRef(_))
}
def moduleDeps = Seq(`snunit-undertow`(crossScalaVersion))
def ivyDeps = super.ivyDeps() ++ Agg(
upickle,
ivy"com.lihaoyi::castor::${Versions.castor}",
ivy"org.ekrich::sjavatime::${Versions.sjavatime}",
ivy"com.lihaoyi::pprint::${Versions.pprint}"
)
}
// object `snunit-cask` extends Cross[SNUnitCaskModule](scalaVersions)
// trait SNUnitCaskModule extends Common.Cross with Publish {
// override def generatedSources = T {
// val cask = caskSources().path / "cask"
// val util = cask / "util"
// val scala2 = cask / "src-2"
// val scala3 = cask / "src-3"
// val scalaVersionSpecific = if (isScala3(crossScalaVersion)) scala3 else scala2
// Seq(cask / "src", util / "src", scalaVersionSpecific).map(PathRef(_))
// }
// def moduleDeps = Seq(`snunit-undertow`(crossScalaVersion))
// def ivyDeps = super.ivyDeps() ++ Agg(
// upickle,
// ivy"com.lihaoyi::castor::${Versions.castor}",
// ivy"org.ekrich::sjavatime::${Versions.sjavatime}",
// ivy"com.lihaoyi::pprint::${Versions.pprint}"
// )
// }

object integration extends ScalaModule {
object tests extends Module {
Expand All @@ -202,46 +202,46 @@ object integration extends ScalaModule {
def ivyDeps = super.ivyDeps() ++ Agg(undertow)
}
}
object `cask-helloworld` extends CrossPlatform {
object jvm extends CrossPlatformScalaModule with Common.Scala3OnlyJvm {
def ivyDeps = super.ivyDeps() ++ Agg(
ivy"com.lihaoyi::cask:${Versions.cask}"
)
}
object native extends CrossPlatformScalaModule with Common.Scala3Only {
def moduleDeps = Seq(`snunit-cask`(crossScalaVersion))
}
}
// object `cask-helloworld` extends CrossPlatform {
// object jvm extends CrossPlatformScalaModule with Common.Scala3OnlyJvm {
// def ivyDeps = super.ivyDeps() ++ Agg(
// ivy"com.lihaoyi::cask:${Versions.cask}"
// )
// }
// object native extends CrossPlatformScalaModule with Common.Scala3Only {
// def moduleDeps = Seq(`snunit-cask`(crossScalaVersion))
// }
// }
object `tapir-helloworld` extends Common.Scala3Only {
override def moduleDeps = Seq(`snunit-tapir`(crossScalaVersion))
}
object `tapir-app` extends Common.Scala3Only {
override def moduleDeps = Seq(`snunit-tapir-cats-effect`(crossScalaVersion))
}
object `http4s-helloworld` extends Cross[Http4sHelloWorldModule](http4sVersions)
trait Http4sHelloWorldModule extends Common.Scala3Only with Cross.Module[String] {
def http4sVersion = crossValue
def moduleDeps = Seq(
`snunit-http4s`(crossScalaVersion, http4sVersion)
)
def ivyDeps = super.ivyDeps() ++ Agg(
ivy"org.http4s::http4s-dsl::$http4sVersion"
)
}
object `http4s-app` extends Common.Scala3Only {
val http4sVersion = Versions.http4s1
def moduleDeps = Seq(
`snunit-http4s`(crossScalaVersion, http4sVersion)
)
def ivyDeps = super.ivyDeps() ++ Agg(
ivy"org.http4s::http4s-dsl::$http4sVersion"
)
}
object `tapir-helloworld-cats-effect` extends Common.Scala3Only {
def moduleDeps = Seq(
`snunit-tapir-cats-effect`(crossScalaVersion)
)
}
// object `tapir-app` extends Common.Scala3Only {
// override def moduleDeps = Seq(`snunit-tapir-cats-effect`(crossScalaVersion))
// }
// object `http4s-helloworld` extends Cross[Http4sHelloWorldModule](http4sVersions)
// trait Http4sHelloWorldModule extends Common.Scala3Only with Cross.Module[String] {
// def http4sVersion = crossValue
// def moduleDeps = Seq(
// `snunit-http4s`(crossScalaVersion, http4sVersion)
// )
// def ivyDeps = super.ivyDeps() ++ Agg(
// ivy"org.http4s::http4s-dsl::$http4sVersion"
// )
// }
// object `http4s-app` extends Common.Scala3Only {
// val http4sVersion = Versions.http4s1
// def moduleDeps = Seq(
// `snunit-http4s`(crossScalaVersion, http4sVersion)
// )
// def ivyDeps = super.ivyDeps() ++ Agg(
// ivy"org.http4s::http4s-dsl::$http4sVersion"
// )
// }
// object `tapir-helloworld-cats-effect` extends Common.Scala3Only {
// def moduleDeps = Seq(
// `snunit-tapir-cats-effect`(crossScalaVersion)
// )
// }
}
def scalaVersion = Versions.scala3
object test extends ScalaTests with TestModule.Utest with BuildInfo {
Expand Down
8 changes: 4 additions & 4 deletions versions.sc
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// This file is system-linked in sbt-plugin/project/Versions.scala
// It needs to be a valid Scala file so we can't use top level `val`s
object Versions {
val scalaNative = "0.4.16"
val scalaNative = "0.5.4"
val upickle = "3.2.0"
val undertow = "2.3.10.Final"
val scala212 = "2.12.19"
val scala3 = "3.3.3"
val tapir = "1.9.2"
val cask = "0.9.1"
val tapir = "1.11.1"
val cask = "0.9.4"
val catsEffect = "3.6-623178c"
val http4s023 = "0.23.26"
val http4s1 = "1.0.0-M41"
val mill011 = "0.11.7"
val utest = "0.8.2"
val utest = "0.8.4"
val osLib = "0.9.2"
val sttp = "3.9.6"
val pprint = "0.8.1"
Expand Down

0 comments on commit d88c481

Please sign in to comment.