-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scala 3 support, drop Scala 2.12, zio-sbt, integration tests as separ… (
#304) * Scala 3 support, drop Scala 2.12, zio-sbt, integration tests as separate module * reinstating ci-release
- Loading branch information
Showing
5 changed files
with
52 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,122 +1,64 @@ | ||
lazy val scala_212 = "2.12.18" | ||
lazy val scala_213 = "2.13.12" | ||
|
||
lazy val V = new { | ||
val ociSdk = "3.30.0" | ||
val scalaCollectionCompat = "2.11.0" | ||
val zio = "2.0.19" | ||
val `zio-nio` = "2.0.2" | ||
val ociSdk = "3.31.1" | ||
val `zio-nio` = "2.0.2" | ||
} | ||
|
||
lazy val D = new { | ||
val objectStorage = Seq( | ||
"com.oracle.oci.sdk" % "oci-java-sdk-objectstorage" % V.ociSdk | ||
) | ||
|
||
val scalaModules = Seq( | ||
"org.scala-lang.modules" %% "scala-collection-compat" % V.scalaCollectionCompat | ||
) | ||
|
||
val zio = Seq( | ||
"dev.zio" %% "zio" % V.zio, | ||
"dev.zio" %% "zio-streams" % V.zio | ||
) | ||
|
||
val `zio-nio` = "dev.zio" %% "zio-nio" % V.`zio-nio` | ||
|
||
val zioTest = Seq( | ||
"dev.zio" %% "zio-test" % V.zio, | ||
"dev.zio" %% "zio-test-sbt" % V.zio | ||
) | ||
|
||
val `httpclient-jersey` = "com.oracle.oci.sdk" % "oci-java-sdk-common-httpclient-jersey" % V.ociSdk | ||
val objectStorage = "com.oracle.oci.sdk" % "oci-java-sdk-objectstorage" % V.ociSdk | ||
val `zio-nio` = "dev.zio" %% "zio-nio" % V.`zio-nio` | ||
val `httpclient-jersey` = "com.oracle.oci.sdk" % "oci-java-sdk-common-httpclient-jersey" % V.ociSdk % Test | ||
} | ||
|
||
lazy val flags = Seq( | ||
"-deprecation", | ||
"-encoding", | ||
"UTF-8", | ||
"-explaintypes", | ||
"-Yrangepos", | ||
"-feature", | ||
"-language:higherKinds", | ||
"-language:existentials", | ||
"-language:implicitConversions", | ||
"-unchecked", | ||
"-Xlint:_,-type-parameter-shadow", | ||
"-Xsource:2.13", | ||
"-Ywarn-dead-code", | ||
"-Ywarn-numeric-widen", | ||
"-Ywarn-value-discard", | ||
"-Xfatal-warnings", | ||
"-Ywarn-unused", | ||
"-opt-warnings", | ||
"-Xlint:constant", | ||
"-Ywarn-extra-implicit" | ||
) | ||
|
||
def versionDependent(scalaVersion: String) = | ||
CrossVersion.partialVersion(scalaVersion) match { | ||
case Some((2, major)) if major >= 13 => | ||
flags ++ Seq( | ||
"-Wconf:any:error", | ||
"-Ymacro-annotations", | ||
"-Xlint:-byname-implicit" | ||
) | ||
case _ => | ||
flags ++ Seq( | ||
"-Xfuture", | ||
"-Xlint:by-name-right-associative", | ||
"-Xlint:unsound-match", | ||
"-Yno-adapted-args", | ||
"-Ypartial-unification", | ||
"-Ywarn-inaccessible", | ||
"-Ywarn-infer-any", | ||
"-Ywarn-nullary-override", | ||
"-Ywarn-nullary-unit" | ||
) | ||
} | ||
enablePlugins(ZioSbtEcosystemPlugin) | ||
|
||
lazy val commonSettings = Seq( | ||
organization := "io.laserdisc", | ||
scalaVersion := scala_213, | ||
crossScalaVersions := Seq(scala_212, scala_213), | ||
scalacOptions ++= versionDependent(scalaVersion.value), | ||
homepage := Some(url("https://github.com/laserdisc-io/zio-oci-objectstorage")), | ||
licenses += "MIT" -> url("http://opensource.org/licenses/MIT"), | ||
developers += Developer("amir", "Amir Saeid", "[email protected]", url("https://github.com/amir")) | ||
inThisBuild( | ||
Seq( | ||
name := "ZIO OCI ObjectStorage", | ||
zioVersion := "2.0.21", | ||
organization := "io.laserdisc", | ||
scalaVersion := scala213.value, | ||
crossScalaVersions := Seq(scala213.value, scala3.value), | ||
homepage := Some(url("https://github.com/laserdisc-io/zio-oci-objectstorage")), | ||
licenses += "MIT" -> url("http://opensource.org/licenses/MIT"), | ||
developers += Developer("amir", "Amir Saeid", "[email protected]", url("https://github.com/amir")) | ||
) | ||
) | ||
|
||
lazy val testkit = project | ||
.in(file("testkit")) | ||
.settings(commonSettings) | ||
.settings(enableZIO(enableStreaming = true)) | ||
.settings( | ||
name := "zio-oci-objectstorage-testkit", | ||
libraryDependencies ++= D.zio ++ D.objectStorage ++ D.zioTest.map(_ % Test) :+ D.`zio-nio`, | ||
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework") | ||
libraryDependencies ++= D.objectStorage :: D.`zio-nio` :: Nil | ||
) | ||
.dependsOn(`zio-oci-objectstorage`) | ||
.dependsOn(core) | ||
|
||
lazy val `zio-oci-objectstorage` = project | ||
lazy val core = project | ||
.in(file("core")) | ||
.configs(IntegrationTest) | ||
.settings(commonSettings) | ||
.settings(Defaults.itSettings) | ||
.settings(enableZIO(enableStreaming = true)) | ||
.settings( | ||
name := "zio-oci-objectstorage", | ||
libraryDependencies ++= D.zio ++ D.objectStorage ++ D.scalaModules ++ (D.zioTest :+ D.`httpclient-jersey`).map(_ % "it,test"), | ||
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework") | ||
libraryDependencies ++= D.objectStorage :: D.`httpclient-jersey` :: Nil | ||
) | ||
|
||
lazy val `integration-tests` = project | ||
.in(file("it")) | ||
.settings(enableZIO(enableStreaming = true)) | ||
.settings( | ||
name := "zio-oci-objectstorage-it", | ||
libraryDependencies ++= D.objectStorage :: D.`httpclient-jersey` :: Nil, | ||
publish / skip := true | ||
) | ||
.dependsOn(core) | ||
|
||
lazy val root = project | ||
.in(file(".")) | ||
.aggregate(`zio-oci-objectstorage`, testkit) | ||
.settings(commonSettings) | ||
.aggregate(core, `integration-tests`, testkit) | ||
.settings( | ||
publish / skip := true, | ||
addCommandAlias("fmtCheck", ";scalafmtCheckAll;scalafmtSbtCheck"), | ||
addCommandAlias("fmt", ";Test / scalafmtAll;scalafmtAll;scalafmtSbt;Test / scalafmtAll"), | ||
addCommandAlias("fullTest", ";clean;test;IntegrationTest / test"), | ||
addCommandAlias("fmt", ";scalafmtAll;scalafmtSbt;Test/scalafmtAll"), | ||
addCommandAlias("fullTest", ";clean;test"), | ||
addCommandAlias( | ||
"setReleaseOptions", | ||
"set scalacOptions ++= Seq(\"-opt:l:method\", \"-opt:l:inline\", \"-opt-inline-from:laserdisc.**\", \"-opt-inline-from:<sources>\")" | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") | ||
addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % "0.4.0-alpha.22") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") |