-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
100 additions
and
172 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 was deleted.
Oops, something went wrong.
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,15 +1,4 @@ | ||
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/TonioGela/base.g8/ci.yml?branch=main) ![GitHub last commit](https://img.shields.io/github/last-commit/TonioGela/base.g8) ![GitHub](https://img.shields.io/github/license/TonioGela/base.g8) [![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org) | ||
|
||
|
||
A [Giter8](https://github.com/foundweekends/giter8) template for [Cats-effect 3](https://typelevel.org/cats-effect/) with a lot of bells and whistles! | ||
|
||
This template features: | ||
- a strong `scalafmt` configuration | ||
- a strong `scalafix` configuration + organize import rule | ||
- an opinionated overridden base import with `cats._` and `cats.effect._` stuff | ||
- `munit-cats-effect-3` as test framework | ||
- `sbt-github-actions`, `sbt-tpolecat`, `sbt-updates` plugins | ||
- `kind-projector`, `scala-typed-holes` and `better-monadic-for` compiler plugins | ||
- everything in a way too modular configuration | ||
|
||
...plus it should stay up to date with dependencies thanks to [Scala-Steward](https://github.com/scala-steward-org/scala-steward-action) | ||
A [Giter8](https://github.com/foundweekends/giter8) template for [Cats-effect 3](https://typelevel.org/cats-effect/) with a lot of bells and whistles! |
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,30 +1,25 @@ | ||
// This build is for this Giter8 template. | ||
|
||
// To test the template run `g8` or `g8Test` from the sbt session. | ||
// See http://www.foundweekends.org/giter8/testing.html#Using+the+Giter8Plugin for more details. | ||
lazy val root = (project in file(".")).enablePlugins(ScriptedPlugin).settings( | ||
lazy val root = (project in file(".")).settings( | ||
name := "base.g8", | ||
scalaVersion := "2.12.15", | ||
scalaVersion := "2.12.19", | ||
Test / test := { val _ = (Test / g8Test).toTask("").value }, | ||
scriptedLaunchOpts ++= | ||
List("-Xms1024m", "-Xmx1024m", "-XX:ReservedCodeCacheSize=128m", "-Xss2m", "-Dfile.encoding=UTF-8"), | ||
resolvers += | ||
Resolver.url("typesafe", url("https://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns), | ||
// this makes g8 buggy | ||
useSuperShell := false, | ||
scriptedLaunchOpts ++= List( | ||
"-Xms1024m", | ||
"-Xmx1024m", | ||
"-XX:ReservedCodeCacheSize=128m", | ||
"-Xss2m", | ||
"-Dfile.encoding=UTF-8" | ||
), | ||
ThisBuild / githubWorkflowPublishTargetBranches := Seq(), | ||
ThisBuild / githubWorkflowScalaVersions := Seq("2.12.15"), | ||
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("g8Test"), name = Some("Testing template"))), | ||
ThisBuild / githubWorkflowScalaVersions := Seq("2.12.19"), | ||
ThisBuild / githubWorkflowBuild := | ||
Seq(WorkflowStep.Sbt(List("g8Test"), name = Some("Testing template"))), | ||
// These are here for scala-steward | ||
scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.6.0", | ||
libraryDependencies ++= Seq( | ||
"org.typelevel" %% "cats-effect" % "3.5.4", | ||
"co.fs2" %% "fs2-core" % "3.10.2", | ||
"com.monovore" %% "decline-effect" % "2.4.1", | ||
"is.cir" %% "ciris" % "3.5.0", | ||
("org.typelevel" % "kind-projector" % "0.13.3").cross(CrossVersion.full), | ||
("com.github.cb372" % "scala-typed-holes" % "0.1.11").cross(CrossVersion.full), | ||
"com.olegpy" %% "better-monadic-for" % "0.3.1", | ||
"org.typelevel" %% "munit-cats-effect-3" % "1.0.7" | ||
"org.typelevel" %% "cats-core" % "2.10.0", | ||
"org.typelevel" %% "cats-effect" % "3.5.4", | ||
"co.fs2" %% "fs2-io" % "3.10.2", | ||
"com.monovore" %% "decline-effect" % "2.4.1", | ||
"com.disneystreaming" %% "weaver-cats" % "0.8.3", | ||
"com.disneystreaming" %% "weaver-scalacheck" % "0.8.3" | ||
) | ||
) |
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,8 +1,7 @@ | ||
addSbtPlugin("org.foundweekends.giter8" %% "sbt-giter8" % "0.16.2") | ||
libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value | ||
addSbtPlugin("org.foundweekends.giter8" %% "sbt-giter8" % "0.16.2") | ||
libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value | ||
// These are here for scala-steward | ||
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.0") | ||
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1") | ||
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4") | ||
addSbtPlugin("org.typelevel" % "sbt-typelevel-github-actions" % "0.6.7") | ||
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.0") |
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,11 +1,3 @@ | ||
# $name$ | ||
|
||
Don't forget to run `git init` and `sbt githubWorkflowGenerate` and to set an homepage url | ||
|
||
# Useful commands in this project | ||
- `scalafix` | ||
- `scalafmtSbt` | ||
- `scalafixAll` | ||
- `githubWorkflowGenerate` | ||
|
||
You can bundle it with [sbt-native-packager](https://github.com/sbt/sbt-native-packager) or [sbt-native-image](https://github.com/scalameta/sbt-native-image) | ||
Don't forget to run `git init` and `sbt githubWorkflowGenerate` |
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,8 +1,21 @@ | ||
import Dependencies._ | ||
import Settings._ | ||
|
||
inScope(Global)(globalSettings) | ||
inThisBuild(scalaFixSettings ++ sbtGithubActionsSettings ++ publicSettings) | ||
inScope(Global)( | ||
List(onChangedBuildSource := ReloadOnSourceChanges, showSuccess := false, excludeLintKeys += showSuccess) | ||
) | ||
|
||
lazy val root = (project in file(".")) | ||
.settings(name := "$name$", commonSettings, libraryDependencies ++= coreDependencies ++ testDependencies) | ||
inThisBuild(List( | ||
crossScalaVersions := List("3.4.1"), | ||
githubWorkflowPublishTargetBranches := Nil, | ||
semanticdbEnabled := true, | ||
semanticdbVersion := scalafixSemanticdb.revision | ||
)) | ||
|
||
lazy val root = (project in file(".")).settings( | ||
scalaVersion := "3.4.1", | ||
name := "$name$", | ||
organization := "dev.toniogela", | ||
organizationName := "toniogela.dev", | ||
version := "0.0.1-SNAPSHOT", | ||
libraryDependencies ++= coreDependencies ++ testDependencies | ||
) |
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,7 +1,4 @@ | ||
verbatim=.gitignore .scalafix.conf .scalafmt.conf | ||
|
||
name=Effectfool | ||
description=Cats Effect template with a lot of bells and whistles | ||
organization=dev.toniogela | ||
organization_name=toniogela.dev | ||
add_fs2=false | ||
description=Cats Effect template with a lot of bells and whistles |
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 was deleted.
Oops, something went wrong.
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,5 +1,4 @@ | ||
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.0") | ||
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1") | ||
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4") | ||
addSbtPlugin("org.typelevel" % "sbt-typelevel-github-actions" % "0.6.7") | ||
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.0") |
3 changes: 0 additions & 3 deletions
3
src/main/g8/src/main/scala/$organization__packaged$/$name__Camel$.scala
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package dev.toniogela | ||
|
||
import cats.effect.* | ||
|
||
object $name; format = "Camel" $ { | ||
def say(): IO[String] = IO.delay("Hello Cats Effect!") | ||
} |
4 changes: 3 additions & 1 deletion
4
...scala/$organization__packaged$/Main.scala → ...8/src/main/scala/dev/toniogela/Main.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
10 changes: 0 additions & 10 deletions
10
src/main/g8/src/test/scala/$organization__packaged$/$name__Camel$Suite.scala
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.