|
| 1 | +import sbtcrossproject.CrossPlugin.autoImport.crossProject |
| 2 | + |
| 3 | +lazy val scala211 = "2.11.12" |
| 4 | +lazy val scala212 = "2.12.11" |
| 5 | +lazy val scala213 = "2.13.2" |
| 6 | + |
| 7 | +lazy val scalatestVersion = "3.1.2" |
| 8 | + |
| 9 | +name := "blake3" |
| 10 | +organization in ThisBuild := "ky.korins" |
| 11 | +version in ThisBuild := "1.0.0" |
| 12 | +scalaVersion in ThisBuild := scala213 |
| 13 | +crossScalaVersions in ThisBuild := Seq(scala212, scala211, scala213) |
| 14 | +scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation") |
| 15 | + |
| 16 | +publishTo in ThisBuild := sonatypePublishTo.value |
| 17 | +sonatypeProfileName in ThisBuild := "ky.korins" |
| 18 | +publishMavenStyle in ThisBuild := true |
| 19 | +sonatypeProjectHosting in ThisBuild := Some(xerial.sbt. Sonatype. GitHubHosting( "catap", "scala-blake3", "[email protected]")) |
| 20 | +licenses in ThisBuild := Seq("The Unlicense" -> url("https://github.com/catap/scala-blake3/blob/master/LICENSE.txt")) |
| 21 | +homepage in ThisBuild := Some(url("https://github.com/catap/scala-blake3")) |
| 22 | +scmInfo in ThisBuild := Some( |
| 23 | + ScmInfo( |
| 24 | + url("https://github.com/catap/scala-blake3"), |
| 25 | + "scm:[email protected]:catap/scala-blake3.git" |
| 26 | + ) |
| 27 | +) |
| 28 | +developers in ThisBuild := List( |
| 29 | + Developer(id ="catap", name ="Kirill A. Korinsky", email ="[email protected]", url =url( "https://github.com/catap")) |
| 30 | +) |
| 31 | + |
| 32 | +skip in publish := true |
| 33 | + |
| 34 | +lazy val blake3 = crossProject(JSPlatform, JVMPlatform, NativePlatform) |
| 35 | + .crossType(CrossType.Full) |
| 36 | + .in(file(".")) |
| 37 | + .settings( |
| 38 | + skip in publish := false, |
| 39 | + publishArtifact in Test := false, |
| 40 | + libraryDependencies ++= Seq( |
| 41 | + "org.scalatest" %%% "scalatest" % scalatestVersion % Test, |
| 42 | + ) |
| 43 | + ) |
| 44 | + .nativeSettings( |
| 45 | + scalaVersion := scala211, |
| 46 | + crossScalaVersions := Seq(scala211), |
| 47 | + nativeLinkStubs := true, |
| 48 | + Test / test := {} |
| 49 | + ) |
| 50 | + |
| 51 | +lazy val bench = project.in(file("bench")) |
| 52 | + .dependsOn(blake3.jvm) |
| 53 | + .settings( |
| 54 | + name := "blake3-bench", |
| 55 | + ) |
| 56 | + .enablePlugins(JmhPlugin) |
0 commit comments