Skip to content

Prepare repository for next release and SBT build improvements #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=2.4.2
version=2.6.0
style = defaultWithAlign
maxColumn = 100

Expand Down
2 changes: 1 addition & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ These are the people that have contributed to the _exercises-scalatutorial_ proj
- [![julienrf](https://avatars2.githubusercontent.com/u/332812?v=4&s=20) **julienrf**](https://github.com/julienrf)
- [![juanpedromoreno](https://avatars2.githubusercontent.com/u/4879373?v=4&s=20) **juanpedromoreno**](https://github.com/juanpedromoreno)
- [![jdesiloniz](https://avatars2.githubusercontent.com/u/2835739?v=4&s=20) **jdesiloniz**](https://github.com/jdesiloniz)
- [![kiroco12](https://avatars1.githubusercontent.com/u/48894338?v=4&s=20) **kiroco12**](https://github.com/kiroco12)
- [![47erbot](https://avatars1.githubusercontent.com/u/24799081?v=4&s=20) **47erbot**](https://github.com/47erbot)
- [![kiroco12](https://avatars1.githubusercontent.com/u/48894338?v=4&s=20) **kiroco12**](https://github.com/kiroco12)
- [![FRosner](https://avatars2.githubusercontent.com/u/3427394?v=4&s=20) **FRosner**](https://github.com/FRosner)
- [![MaureenElsberry](https://avatars0.githubusercontent.com/u/17556002?v=4&s=20) **MaureenElsberry**](https://github.com/MaureenElsberry)
- [![sauntimo](https://avatars3.githubusercontent.com/u/2720466?v=4&s=20) **sauntimo**](https://github.com/sauntimo)
Expand Down
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 _exercises-scalatutorial_ 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 @@

exercises-scalatutorial

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.
32 changes: 23 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
import com.jsuereth.sbtpgp.PgpKeys.publishSigned

ThisBuild / organization := "org.scala-exercises"
ThisBuild / githubOrganization := "47degrees"
ThisBuild / scalaVersion := "2.13.2"

publish / skip := true

// This is required by the exercises compiler:
publishLocal := (publishLocal dependsOn compile).value
publishSigned := (publishSigned dependsOn compile).value

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

lazy val exercises = (project in file("."))
.settings(moduleName := "exercises-scalatutorial")
.settings(exercisesSettings)
.settings(name := "exercises-scalatutorial")
.settings(
libraryDependencies ++= Seq(
"org.scala-exercises" %% "exercise-compiler" % "0.6.1",
"org.scala-exercises" %% "definitions" % "0.6.1",
"com.chuusai" %% "shapeless" % "2.3.3",
"org.scalatest" %% "scalatest" % "3.1.2",
"org.scalacheck" %% "scalacheck" % "1.14.3",
"org.scalatestplus" %% "scalacheck-1-14" % "3.1.2.0",
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % "1.2.5"
)
)
.enablePlugins(ExerciseCompilerPlugin)

lazy val `project-docs` = (project in file(".docs"))
.aggregate(exercises)
.dependsOn(exercises)
.settings(moduleName := "exercises-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.
49 changes: 0 additions & 49 deletions project/ProjectPlugin.scala

This file was deleted.

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
18 changes: 9 additions & 9 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.6.0")
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")
addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.6.1")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
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")
5 changes: 3 additions & 2 deletions src/main/scala/scalatutorial/ScalaTutorial.scala
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 All @@ -20,7 +20,8 @@ import org.scalaexercises.definitions.Library

import sections._

/** Quickly learn Scala through an interactive tutorial based on the first two courses of the Scala MOOCs.
/**
* Quickly learn Scala through an interactive tutorial based on the first two courses of the Scala MOOCs.
*
* @param name scala_tutorial
*/
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 All @@ -18,7 +18,8 @@ package scalatutorial.sections

import scalatutorial.utils.{BankAccount, Note}

/** @param name classes_vs_case_classes */
/**
* @param name classes_vs_case_classes */
object ClassesVsCaseClasses extends ScalaTutorialSection {

/**
Expand Down Expand Up @@ -74,7 +75,6 @@ object ClassesVsCaseClasses extends ScalaTutorialSection {
* members, whereas this is not the case with regular classes.
*
* = Equality =
*
*/
def equality(res0: Boolean, res1: Boolean): Unit = {
val aliceAccount = new BankAccount
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 All @@ -16,7 +16,8 @@

package scalatutorial.sections

/** @param name definitions_and_evaluation */
/**
* @param name definitions_and_evaluation */
object DefinitionsAndEvaluation extends ScalaTutorialSection {

/**
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/scalatutorial/sections/FunctionalLoops.scala
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 All @@ -16,7 +16,8 @@

package scalatutorial.sections

/** @param name functional_loops */
/**
* @param name functional_loops */
object FunctionalLoops extends ScalaTutorialSection {

/**
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 All @@ -16,7 +16,8 @@

package scalatutorial.sections

/** @param name higher_order_functions */
/**
* @param name higher_order_functions */
object HigherOrderFunctions extends ScalaTutorialSection {

/**
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 All @@ -18,7 +18,8 @@ package scalatutorial.sections

import scalatutorial.utils.BankAccount

/** @param name imperative_programming */
/**
* @param name imperative_programming */
object ImperativeProgramming extends ScalaTutorialSection {

/**
Expand Down
9 changes: 5 additions & 4 deletions src/main/scala/scalatutorial/sections/LazyEvaluation.scala
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 All @@ -16,7 +16,8 @@

package scalatutorial.sections

/** @param name lazy_evaluation */
/**
* @param name lazy_evaluation */
object LazyEvaluation extends ScalaTutorialSection {

/**
Expand Down Expand Up @@ -234,9 +235,9 @@ object LazyEvaluation extends ScalaTutorialSection {
def lazyVal(res0: String): Unit = {
val builder = new StringBuilder

val x = { builder += 'x'; 1 }
val x = { builder += 'x'; 1 }
lazy val y = { builder += 'y'; 2 }
def z = { builder += 'z'; 3 }
def z = { builder += 'z'; 3 }

z + y + x + z + y + x

Expand Down
7 changes: 3 additions & 4 deletions src/main/scala/scalatutorial/sections/LexicalScopes.scala
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 All @@ -16,7 +16,8 @@

package scalatutorial.sections

/** @param name lexical_scopes */
/**
* @param name lexical_scopes */
object LexicalScopes extends ScalaTutorialSection {

/**
Expand Down Expand Up @@ -75,7 +76,6 @@ object LexicalScopes extends ScalaTutorialSection {
* == Exercise: Scope Rules ==
*
* What is the value of `result` in the following program?
*
*/
def scopeRules(res0: Int): Unit = {
val x = 0
Expand Down Expand Up @@ -286,7 +286,6 @@ object LexicalScopes extends ScalaTutorialSection {
* }}}
*
* = Exercise =
*
*/
def objectScopes(res0: Int): Unit = {
object Foo {
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 All @@ -18,7 +18,8 @@ package scalatutorial.sections

import scalatutorial.utils.{Empty, NonEmpty}

/** @param name object_oriented_programming */
/**
* @param name object_oriented_programming */
object ObjectOrientedProgramming extends ScalaTutorialSection {

/**
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/scalatutorial/sections/PolymorphicTypes.scala
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 All @@ -16,7 +16,8 @@

package scalatutorial.sections

/** @param name polymorphic_types */
/**
* @param name polymorphic_types */
object PolymorphicTypes extends ScalaTutorialSection {

/**
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
Loading