Skip to content

Commit 1a9361c

Browse files
committed
Extracted code from electt to dedicated repo
Since this commit I've moved away blake3 from electt to dedicated repo and published it into maven central.
1 parent 76daad9 commit 1a9361c

File tree

7 files changed

+119
-0
lines changed

7 files changed

+119
-0
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# scala
2+
*.class
3+
*.log
4+
5+
# sbt specific
6+
.cache
7+
.history
8+
.lib/
9+
dist/*
10+
target/
11+
lib_managed/
12+
src_managed/
13+
project/boot/
14+
project/plugins/project/
15+
16+
# IDEA stuff
17+
.idea/

LICENSE.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (C) 2020 Kirill A. Korinsky <[email protected]>
2+
3+
This is free and unencumbered software released into the public domain.
4+
5+
Anyone is free to copy, modify, publish, use, compile, sell, or
6+
distribute this software, either in source code form or as a compiled
7+
binary, for any purpose, commercial or non-commercial, and by any
8+
means.
9+
10+
In jurisdictions that recognize copyright laws, the author or authors
11+
of this software dedicate any and all copyright interest in the
12+
software to the public domain. We make this dedication for the benefit
13+
of the public at large and to the detriment of our heirs and
14+
successors. We intend this dedication to be an overt act of
15+
relinquishment in perpetuity of all present and future rights to this
16+
software under copyright law.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
22+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+
OTHER DEALINGS IN THE SOFTWARE.
25+
26+
For more information, please refer to <http://unlicense.org/>

build.sbt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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)

local.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh -e
2+
3+
sbt clean test ++2.11.12 blake3/publishLocal ++2.12.11 blake3/publishLocal ++2.13.2 blake3/publishLocal

project/build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sbt.version=1.3.10

project/plugins.sbt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")
2+
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.0.0")
3+
4+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.1.0")
5+
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0-M2")
6+
7+
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.7")
8+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
9+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8.1")

publish.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh -e
2+
3+
# To prevent publish the same artifact at scala-native I've used this hack :(
4+
sbt clean test \
5+
++2.11.12 blake3Native/publishSigned blake3JS/publishSigned blake3JVM/publishSigned \
6+
++2.12.11 blake3JS/publishSigned blake3JVM/publishSigned \
7+
++2.13.2 blake3JS/publishSigned blake3JVM/publishSigned

0 commit comments

Comments
 (0)