-
Notifications
You must be signed in to change notification settings - Fork 331
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
1 parent
a70967a
commit d555692
Showing
85 changed files
with
1,753 additions
and
1,150 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
style = defaultWithAlign | ||
maxColumn = 100 | ||
|
||
continuationIndent.callSite = 2 | ||
|
||
newlines { | ||
sometimesBeforeColonInMethodReturnType = false | ||
} | ||
|
||
align { | ||
arrowEnumeratorGenerator = false | ||
ifWhileOpenParen = false | ||
openParenCallSite = false | ||
openParenDefnSite = false | ||
} | ||
|
||
docstrings = JavaDoc | ||
|
||
rewrite { | ||
rules = [SortImports, RedundantBraces] | ||
redundantBraces.maxLines = 1 | ||
} | ||
|
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,51 +1,23 @@ | ||
val scalaExerciesV = "0.4.0-SNAPSHOT" | ||
|
||
def dep(artifactId: String) = "org.scala-exercises" %% artifactId % scalaExerciesV | ||
|
||
lazy val stdlib = (project in file(".")) | ||
.settings(publishSettings:_*) | ||
.enablePlugins(ExerciseCompilerPlugin) | ||
.settings( | ||
organization := "org.scala-exercises", | ||
name := "exercises-stdlib", | ||
scalaVersion := "2.11.8", | ||
version := "0.3.0-SNAPSHOT", | ||
resolvers ++= Seq( | ||
Resolver.sonatypeRepo("snapshots"), | ||
Resolver.sonatypeRepo("releases") | ||
), | ||
libraryDependencies ++= Seq( | ||
"com.chuusai" %% "shapeless" % "2.2.5", | ||
"org.scalatest" %% "scalatest" % "2.2.4", | ||
"org.scala-exercises" %% "exercise-compiler" % version.value, | ||
"org.scala-exercises" %% "definitions" % version.value, | ||
"org.scalacheck" %% "scalacheck" % "1.12.5", | ||
"com.github.alexarchambault" %% "scalacheck-shapeless_1.12" % "0.3.1" | ||
), | ||
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")) | ||
dep("exercise-compiler"), | ||
dep("definitions"), | ||
%%("shapeless"), | ||
%%("scalatest"), | ||
%%("scalacheck"), | ||
%%("scheckShapeless") | ||
) | ||
) | ||
|
||
|
||
// Distribution | ||
|
||
lazy val gpgFolder = sys.env.getOrElse("PGP_FOLDER", ".") | ||
|
||
lazy val publishSettings = Seq( | ||
organizationName := "Scala Exercises", | ||
organizationHomepage := Some(new URL("http://scala-exercises.org")), | ||
startYear := Some(2016), | ||
description := "Scala Exercises: The path to enlightenment", | ||
homepage := Some(url("http://scala-exercises.org")), | ||
pgpPassphrase := Some(sys.env.getOrElse("PGP_PASSPHRASE", "").toCharArray), | ||
pgpPublicRing := file(s"$gpgFolder/pubring.gpg"), | ||
pgpSecretRing := file(s"$gpgFolder/secring.gpg"), | ||
credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", sys.env.getOrElse("PUBLISH_USERNAME", ""), sys.env.getOrElse("PUBLISH_PASSWORD", "")), | ||
scmInfo := Some(ScmInfo(url("https://github.com/scala-exercises/exercises-stdlib"), "https://github.com/scala-exercises/exercises-stdlib.git")), | ||
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")), | ||
publishMavenStyle := true, | ||
publishArtifact in Test := false, | ||
pomIncludeRepository := Function.const(false), | ||
publishTo := { | ||
val nexus = "https://oss.sonatype.org/" | ||
if (isSnapshot.value) | ||
Some("Snapshots" at nexus + "content/repositories/snapshots") | ||
else | ||
Some("Releases" at nexus + "service/local/staging/deploy/maven2") | ||
} | ||
) | ||
pgpPassphrase := Some(getEnvVar("PGP_PASSPHRASE").getOrElse("").toCharArray) | ||
pgpPublicRing := file(s"$gpgFolder/pubring.gpg") | ||
pgpSecretRing := file(s"$gpgFolder/secring.gpg") |
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,47 @@ | ||
import de.heikoseeberger.sbtheader.HeaderPattern | ||
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport._ | ||
import sbt.Keys._ | ||
import sbt._ | ||
import sbtorgpolicies._ | ||
import sbtorgpolicies.model._ | ||
import sbtorgpolicies.OrgPoliciesPlugin.autoImport._ | ||
|
||
object ProjectPlugin extends AutoPlugin { | ||
|
||
override def trigger: PluginTrigger = allRequirements | ||
|
||
override def requires: Plugins = plugins.JvmPlugin && OrgPoliciesPlugin | ||
|
||
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 := "2.11.8", | ||
scalaOrganization := "org.scala-lang", | ||
crossScalaVersions := Seq("2.11.8"), | ||
resolvers ++= Seq( | ||
Resolver.mavenLocal, | ||
Resolver.sonatypeRepo("snapshots"), | ||
Resolver.sonatypeRepo("releases") | ||
), | ||
scalacOptions := sbtorgpolicies.model.scalacCommonOptions, | ||
headers := Map( | ||
"scala" -> (HeaderPattern.cStyleBlockComment, | ||
s"""|/* | ||
| * scala-exercises - ${name.value} | ||
| * Copyright (C) 2015-2016 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 +1 @@ | ||
sbt.version=0.13.12 | ||
sbt.version=0.13.13 |
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.