-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
78 lines (66 loc) · 2.61 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
enablePlugins(GitVersioning)
enablePlugins(GitBranchPrompt)
ThisBuild / name := "asynch"
ThisBuild / version := "3.2.2"
ThisBuild / organization := "org.purang.net"
ThisBuild / scalaVersion := "3.2.2"
ThisBuild / crossScalaVersions := Seq("3.2.2", "2.13.10")
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / update / evictionWarningOptions := EvictionWarningOptions.empty
ThisBuild / fork := true
ThisBuild / logBuffered := false
ThisBuild / Test / parallelExecution := true
//ThisBuild / publishArtifact in packageDoc := false
This / sbt.Compile / doc / sources := Seq()
ThisBuild / packageSrc / publishArtifact := true
ThisBuild / Test / packageSrc / publishArtifact := false
ThisBuild / licenses += ("BSD", url("https://www.tldrlegal.com/license/bsd-3-clause-license-%28revised%29"))
Global / turbo := true
Global / cancelable := true
Global / onChangedBuildSource := ReloadOnSourceChanges
Global / lintUnusedKeysOnLoad := false
ThisBuild / scalacOptions ++= Seq(
"-encoding",
"UTF-8",
"-feature",
"-unchecked",
"-Xfatal-warnings",
"-deprecation",
"-language:implicitConversions"
) ++ {
if (scalaVersion.value.matches("^3.")) {
Seq("-Ykind-projector")
} else if (scalaVersion.value.matches("^2.12")) {
Seq("-language:higherKinds")
} else {
Seq()
}
}
val nettyVersion =
"4.1.90.Final"
ThisBuild / libraryDependencies ++= Seq(
"org.asynchttpclient" % "async-http-client" % "2.12.3",
"org.typelevel" %% "cats-effect" % "3.4.8",
"io.netty" % "netty-codec" % nettyVersion,
"io.netty" % "netty-codec-http" % nettyVersion,
"io.netty" % "netty-common" % nettyVersion,
"io.netty" % "netty-handler" % nettyVersion,
"ch.qos.logback" % "logback-classic" % "1.4.6" % Test,
"org.scalameta" %% "munit" % "0.7.29" % Test
).map(_.withSources())
ThisBuild / testFrameworks += new TestFramework("munit.Framework")
ThisBuild / console / initialCommands :=
"""
|import org.purang.net.http._
|import org.purang.net.http.asynchttpclient.AsyncHttpClient
|import org.asynchttpclient.{DefaultAsyncHttpClientConfig, DefaultAsyncHttpClient, AsyncHttpClient => UnderlyingHttpClient}
|
|import cats.data.NonEmptyChain
|import cats.effect.IO
|import cats.effect.unsafe.implicits.global
|import cats.syntax.all._
|
|import java.util.concurrent.TimeUnit
|
""".stripMargin // to exit the console sse.close and defaultNonBlockingExecutor.close
publishTo := sonatypePublishToBundle.value