Skip to content

Commit

Permalink
Prepare repository for next .github release and SBT build improveme…
Browse files Browse the repository at this point in the history
…nts (#122)

* Bumps up dependencies and sbt

* Reorders settings for making them simpler

* Updates command aliases

* Moves .docs to docs. Updates sbt module too

* Simplifies build

* Removes outdated smoketests module

* Removes unused imports. Reorder settings

* Updates sbt plugins

* Updates docs
  • Loading branch information
juanpedromoreno authored Jun 9, 2020
1 parent 1196fee commit 877203e
Show file tree
Hide file tree
Showing 22 changed files with 43 additions and 167 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ the code. Pull requests are also welcome.

People are expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md) when discussing _evaluator_ on the Github page or other venues.

If you are being harassed, please contact one of [us](AUTHORS.md#maintainers) immediately so that we can support you. In case you cannot get in touch with us please write an email to [47 Degrees](mailto:scala-exercises@47deg.com).
If you are being harassed, please contact one of [us](AUTHORS.md#maintainers) immediately so that we can support you. In case you cannot get in touch with us please write an email to [47 Degrees Open Source](mailto:hello@47deg.com).

## How can I help?

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright (C) 2016-2020 47 Degrees <https://47deg.com>
Copyright (C) 2016-2020 47 Degrees Open Source <https://www.47deg.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

evaluator

Copyright (c) 2016-2020 47 Degrees. All rights reserved.
Copyright (c) 2016-2020 47 Degrees Open Source. All rights reserved.

Licensed under Apache-2.0. See [LICENSE](LICENSE.md) for terms.
37 changes: 13 additions & 24 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
addCommandAlias("ci-test", "scalafmtCheckAll; scalafmtSbtCheck; test")
addCommandAlias("ci-docs", "github; project-docs/mdoc; headerCreateAll")
ThisBuild / organization := "org.scala-exercises"
ThisBuild / githubOrganization := "47degrees"
ThisBuild / scalaVersion := V.scala

Universal / javaOptions += "-Dscala.classpath.closeZip=true"
Universal / mainClass := Some("org.scalaexercises.evaluator.EvaluatorServer")

stage := (stage in Universal in `evaluator-server`).value
skip in publish := true

addCommandAlias("ci-test", "scalafmtCheckAll; scalafmtSbtCheck; test")
addCommandAlias("ci-docs", "github; mdoc; headerCreateAll")
addCommandAlias("ci-publish", "github; ci-release")

lazy val `evaluator-server` = (project in file("server"))
.enablePlugins(JavaAppPackaging)
Expand All @@ -17,27 +26,7 @@ lazy val `evaluator-server` = (project in file("server"))
.settings(buildInfoSettings: _*)
.settings(serverScalaMacroDependencies: _*)

lazy val smoketests = (project in file("smoketests"))
.dependsOn(`evaluator-server`)
.enablePlugins(BuildInfoPlugin)
.settings(skip in publish := true)
.settings(
name := "evaluator-server-smoke-tests",
serverHttpDependencies
)
.settings(buildInfoSettings: _*)

lazy val root = (project in file("."))
.settings(mainClass in Universal := Some("org.scalaexercises.evaluator.EvaluatorServer"))
.settings(stage := (stage in Universal in `evaluator-server`).value)
.settings(skip in publish := true)
.aggregate(`evaluator-server`)
.dependsOn(`evaluator-server`)

lazy val `project-docs` = (project in file(".docs"))
.aggregate(`evaluator-server`, smoketests)
.settings(moduleName := "evaluator-project-docs")
.settings(mdocIn := file(".docs"))
lazy val documentation = project
.settings(mdocOut := file("."))
.settings(skip in publish := true)
.settings(publish / skip := true)
.enablePlugins(MdocPlugin)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 5 additions & 16 deletions project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import de.heikoseeberger.sbtheader.HeaderPlugin
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport._
import sbt.Keys._
import sbt._
import sbtassembly.AssemblyPlugin.autoImport.assembly
Expand All @@ -17,19 +15,19 @@ object ProjectPlugin extends AutoPlugin {
object autoImport {

object V {
lazy val cats = "2.1.0"
lazy val cats = "2.1.1"
lazy val catsEffect = "2.1.3"
lazy val http4s = "0.21.3"
lazy val http4s = "0.21.4"
lazy val circe = "0.13.0"
lazy val log4s = "1.7.0"
lazy val scalatest = "3.1.2"
lazy val scalatestplusScheck = "3.1.1.1"
lazy val scalatestplusScheck = "3.1.2.0"
lazy val jodaTime = "2.10.6"
lazy val slf4j = "1.7.30"
lazy val jwtCore = "4.3.0"
lazy val coursier = "2.0.0-RC6-12"
lazy val coursier = "2.0.0-RC6-21"
lazy val config = "1.4.0"
lazy val scala = "2.13.1"
lazy val scala = "2.13.2"
}

lazy val dockerSettings = Seq(
Expand Down Expand Up @@ -92,24 +90,15 @@ object ProjectPlugin extends AutoPlugin {

}

import autoImport._

override def projectSettings: Seq[Def.Setting[_]] =
Seq(
name := "evaluator",
description := "Scala Exercises: The path to enlightenment",
organization := "org.scala-exercises",
organizationName := "47 Degrees",
organizationHomepage := Some(url("https://47deg.com")),
scmInfo := Some(
ScmInfo(
url("https://github.com/scala-exercises/evaluator"),
"scm:git:https://github.com/scala-exercises/evaluator.git",
Some("scm:git:git@github.com:scala-exercises/evaluator.git")
)
),
scalaVersion := V.scala,
crossScalaVersions := Seq(V.scala),
scalacOptions ~= (_ filterNot (_ == "-Xfuture")),
scalacOptions += "-Ymacro-annotations",
javacOptions ++= Seq("-encoding", "UTF-8", "-Xlint:-options"),
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.3.11
sbt.version=1.3.12
24 changes: 12 additions & 12 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.5.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("com.alejandrohdezma" %% "sbt-github" % "0.8.1")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.8.1")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.8.1")
addSbtPlugin("com.alejandrohdezma" % "sbt-mdoc-toc" % "0.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.5.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("com.alejandrohdezma" %% "sbt-github" % "0.8.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.8.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.8.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-remove-test-from-pom" % "0.1.0")
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 47 Degrees <https://47deg.com>
* Copyright 2016-2020 47 Degrees Open Source <https://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 47 Degrees <https://47deg.com>
* Copyright 2016-2020 47 Degrees Open Source <https://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 47 Degrees <https://47deg.com>
* Copyright 2016-2020 47 Degrees Open Source <https://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 47 Degrees <https://47deg.com>
* Copyright 2016-2020 47 Degrees Open Source <https://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 47 Degrees <https://47deg.com>
* Copyright 2016-2020 47 Degrees Open Source <https://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 47 Degrees <https://47deg.com>
* Copyright 2016-2020 47 Degrees Open Source <https://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 47 Degrees <https://47deg.com>
* Copyright 2016-2020 47 Degrees Open Source <https://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 47 Degrees <https://47deg.com>
* Copyright 2016-2020 47 Degrees Open Source <https://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 47 Degrees <https://47deg.com>
* Copyright 2016-2020 47 Degrees Open Source <https://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down

This file was deleted.

0 comments on commit 877203e

Please sign in to comment.