-
Notifications
You must be signed in to change notification settings - Fork 97
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 #92 from scala-exercises/updates-project
Updates Project
- Loading branch information
Showing
21 changed files
with
97 additions
and
125 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,16 @@ | ||
import ProjectPlugin.autoImport._ | ||
val scalaExercisesV = "0.6.0-SNAPSHOT" | ||
addCommandAlias("ci-test", "scalafmtCheckAll; scalafmtSbtCheck; test") | ||
addCommandAlias("ci-docs", "github; project-docs/mdoc; headerCreateAll") | ||
|
||
def dep(artifactId: String) = "org.scala-exercises" %% artifactId % scalaExercisesV | ||
|
||
lazy val cats = (project in file(".")) | ||
lazy val exercises = (project in file(".")) | ||
.settings(moduleName := "exercises-cats") | ||
.settings(exercisesSettings) | ||
.enablePlugins(ExerciseCompilerPlugin) | ||
.settings( | ||
name := "exercises-cats", | ||
libraryDependencies ++= Seq( | ||
dep("exercise-compiler"), | ||
dep("definitions"), | ||
%%("cats-core", V.cats), | ||
%%("shapeless", V.shapeless), | ||
%%("scalatest", V.scalatest), | ||
%%("scalacheck", V.scalacheck), | ||
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % V.scalacheckShapeless, | ||
"org.scalatestplus" %% "scalatestplus-scalacheck" % V.scalatestplusScheck | ||
), | ||
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.11.0" cross CrossVersion.full) | ||
) | ||
|
||
// Distribution | ||
|
||
pgpPassphrase := Some(getEnvVar("PGP_PASSPHRASE").getOrElse("").toCharArray) | ||
pgpPublicRing := file(s"$gpgFolder/pubring.gpg") | ||
pgpSecretRing := file(s"$gpgFolder/secring.gpg") | ||
lazy val `project-docs` = (project in file(".docs")) | ||
.aggregate(exercises) | ||
.dependsOn(exercises) | ||
.settings(moduleName := "exercises-project-docs") | ||
.settings(mdocIn := file(".docs")) | ||
.settings(mdocOut := file(".")) | ||
.settings(skip in publish := true) | ||
.enablePlugins(MdocPlugin) |
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,55 +1,52 @@ | ||
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport._ | ||
import de.heikoseeberger.sbtheader.License._ | ||
import sbt.Keys._ | ||
import sbt._ | ||
import sbtorgpolicies.OrgPoliciesPlugin.autoImport._ | ||
import sbtorgpolicies._ | ||
import sbtorgpolicies.model._ | ||
import com.alejandrohdezma.sbt.github.SbtGithubPlugin | ||
|
||
object ProjectPlugin extends AutoPlugin { | ||
|
||
override def trigger: PluginTrigger = allRequirements | ||
|
||
override def requires: Plugins = plugins.JvmPlugin && OrgPoliciesPlugin | ||
override def requires: Plugins = plugins.JvmPlugin && SbtGithubPlugin | ||
|
||
object autoImport { | ||
|
||
lazy val V = new { | ||
val scala213: String = "2.13.1" | ||
val cats: String = "2.0.0" | ||
val cats: String = "2.1.1" | ||
val shapeless: String = "2.3.3" | ||
val scalatest: String = "3.1.1" | ||
val scalatestplusScheck: String = "3.1.0.0-RC2" | ||
val scala: String = "2.13.2" | ||
val scalaExercises: String = "0.6.0-SNAPSHOT" | ||
val scalacheck: String = "1.14.3" | ||
val scalacheckShapeless: String = "1.2.5" | ||
val scalatest: String = "3.1.1" | ||
val scalatestplusScheck: String = "3.1.1.1" | ||
} | ||
} | ||
|
||
import autoImport._ | ||
def dep(artifactId: String) = "org.scala-exercises" %% artifactId % V.scalaExercises | ||
|
||
lazy val exercisesSettings = Seq( | ||
libraryDependencies ++= Seq( | ||
dep("exercise-compiler"), | ||
dep("definitions"), | ||
"org.typelevel" %% "cats-core" % V.cats, | ||
"com.chuusai" %% "shapeless" % V.shapeless, | ||
"org.scalatest" %% "scalatest" % V.scalatest, | ||
"org.scalacheck" %% "scalacheck" % V.scalacheck, | ||
"org.scalatestplus" %% "scalacheck-1-14" % V.scalatestplusScheck, | ||
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % V.scalacheckShapeless | ||
), | ||
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.11.0" cross CrossVersion.full) | ||
) | ||
} | ||
|
||
override def projectSettings: Seq[Def.Setting[_]] = | ||
Seq( | ||
description := "Scala Exercises: The path to enlightenment", | ||
startYear := Option(2016), | ||
orgGithubSetting := GitHubSettings( | ||
organization = "scala-exercises", | ||
project = name.value, | ||
organizationName = "Scala Exercises", | ||
groupId = "org.scala-exercises", | ||
organizationHomePage = url("https://www.scala-exercises.org"), | ||
organizationEmail = "hello@47deg.com" | ||
), | ||
orgLicenseSetting := ApacheLicense, | ||
scalaVersion := V.scala213, | ||
scalaOrganization := "org.scala-lang", | ||
organization := "org.scala-exercises", | ||
organizationName := "47 Degrees", | ||
organizationHomepage := Some(url("https://47deg.com")), | ||
scalaVersion := autoImport.V.scala, | ||
resolvers ++= Seq( | ||
Resolver.mavenLocal, | ||
Resolver.sonatypeRepo("snapshots"), | ||
Resolver.sonatypeRepo("releases") | ||
), | ||
headerLicense := Some(Custom(s"""| scala-exercises - ${name.value} | ||
| Copyright (C) 2015-2020 47 Degrees, LLC. <http://www.47deg.com> | ||
| | ||
|""".stripMargin)) | ||
) | ||
) | ||
} |
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,6 +1,10 @@ | ||
resolvers ++= Seq( | ||
Resolver.sonatypeRepo("snapshots") | ||
) | ||
|
||
addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.6.0-SNAPSHOT") | ||
addSbtPlugin("com.47deg" % "sbt-org-policies" % "0.12.0-M3") | ||
resolvers += Resolver.sonatypeRepo("snapshots") | ||
addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.6.0-SNAPSHOT") | ||
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3") | ||
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4") | ||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") | ||
addSbtPlugin("com.alejandrohdezma" %% "sbt-github" % "0.8.0") | ||
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.8.0") | ||
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.8.0") | ||
addSbtPlugin("com.alejandrohdezma" % "sbt-mdoc-toc" % "0.2") |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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
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
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
This file was deleted.
Oops, something went wrong.