-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from ahjohannessen/wip-misc-improvements
misc: clean ups + improvements
- Loading branch information
Showing
41 changed files
with
919 additions
and
348 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
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 |
---|---|---|
|
@@ -3,7 +3,9 @@ import Dependencies._ | |
lazy val root = project | ||
.in(file(".")) | ||
.settings(skip in publish := true) | ||
.aggregate(core) | ||
.aggregate(core, netty, demo) | ||
|
||
Global / onLoad ~= (_ andThen ("project core" :: _)) | ||
|
||
lazy val IntegrationTest = config("it") extend Test | ||
|
||
|
@@ -13,39 +15,72 @@ lazy val core = project | |
.settings(inConfig(IntegrationTest)(Defaults.testTasks): _*) | ||
.settings(commonSettings) | ||
.settings( | ||
name := "sec", | ||
Test / testOptions := Seq(Tests.Filter(_ endsWith "Spec")), | ||
name := "sec-core", | ||
Test / testOptions := Seq(Tests.Filter(_ endsWith "Spec")), | ||
IntegrationTest / testOptions := Seq(Tests.Filter(_ endsWith "ITest")), | ||
IntegrationTest / parallelExecution := false, | ||
scalapbCodeGeneratorOptions += CodeGeneratorOption.FlatPackage, | ||
libraryDependencies ++= | ||
compileM(cats, catsEffect, fs2, scodecBits, circe, circeParser, scalaPb) ++ | ||
protobufM(scalaPb) ++ | ||
testM(specs2Cats, catsEffectTesting, catsEffectLaws, specs2ScalaCheck, circeGeneric, grpcNetty, tcnative) | ||
compileM(cats, catsEffect, fs2, log4cats, scodecBits, circe, circeParser, scalaPb) ++ protobufM(scalaPb) ++ | ||
testM( | ||
specs2Cats, | ||
catsEffectTesting, | ||
catsEffectLaws, | ||
specs2ScalaCheck, | ||
circeGeneric, | ||
grpcNetty, | ||
log4catsSlf4j, | ||
log4catsNoop, | ||
logback | ||
) | ||
) | ||
|
||
lazy val netty = project | ||
.in(file("netty")) | ||
.dependsOn(core) | ||
.settings( | ||
name := "sec", | ||
libraryDependencies ++= compileM(grpcNetty) | ||
) | ||
|
||
lazy val demo = project | ||
.dependsOn(netty) | ||
.settings( | ||
name := "demo", | ||
libraryDependencies ++= compileM(log4catsSlf4j, logback), | ||
skip in publish := true | ||
) | ||
|
||
// General Settings | ||
|
||
lazy val commonSettings = Seq( | ||
addCompilerPlugin(kindProjector), | ||
Compile / scalacOptions ~= devScalacOptions, | ||
Test / scalacOptions ~= devScalacOptions, | ||
Compile / scalacOptions ~= devScalacOptions, | ||
Test / scalacOptions ~= devScalacOptions, | ||
IntegrationTest / scalacOptions ~= devScalacOptions, | ||
libraryDependencies ++= testM(catsLaws, disciplineSpecs2, specs2, specs2ScalaCheck) | ||
) | ||
|
||
lazy val metalsEnabled = | ||
scala.util.Properties.envOrElse("METALS_ENABLED", "false").toBoolean | ||
lazy val metalsEnabled = | ||
scala.util.Properties.envOrElse("METALS_ENABLED", "false").toBoolean | ||
|
||
val devScalacOptions = { options: Seq[String] => | ||
if (metalsEnabled) options.filterNot(Set("-Wunused:locals", "-Wunused:params", "-Wunused:imports", "-Wunused:privates")) else options | ||
if (metalsEnabled) | ||
options.filterNot(Set("-Wunused:locals", "-Wunused:params", "-Wunused:imports", "-Wunused:privates")) | ||
else options | ||
} | ||
|
||
inThisBuild( | ||
List( | ||
scalaVersion := "2.13.2", | ||
organization := "io.github.ahjohannessen", | ||
developers := List( | ||
Developer("ahjohannessen", "Alex Henning Johannessen", "[email protected]", url("https://github.com/ahjohannessen")) | ||
Developer( | ||
"ahjohannessen", | ||
"Alex Henning Johannessen", | ||
"[email protected]", | ||
url("https://github.com/ahjohannessen") | ||
) | ||
), | ||
homepage := Some(url("https://github.com/ahjohannessen/sec")), | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")), | ||
|
@@ -58,6 +93,7 @@ inThisBuild( | |
(baseDirectory in LocalRootProject).value.getAbsolutePath, | ||
"-doc-source-url", | ||
"https://github.com/ahjohannessen/sec/blob/v" + version.value + "€{FILE_PATH}.scala" | ||
) | ||
), | ||
shellPrompt := Prompt.enrichedShellPrompt | ||
) | ||
) |
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
1 change: 1 addition & 0 deletions
1
...ain/scala/sec/cluster/grpc/Listener.scala → ...scala/sec/api/cluster/grpc/Listener.scala
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,4 +1,5 @@ | ||
package sec | ||
package api | ||
package cluster | ||
package grpc | ||
|
||
|
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
Oops, something went wrong.