Skip to content

Commit a6b129c

Browse files
Merge pull request #1 from scala-exercises/jp-initial-sbt-structure
JP - Initial SBT structure
2 parents 47e9036 + 5c429fe commit a6b129c

File tree

4 files changed

+102
-0
lines changed

4 files changed

+102
-0
lines changed

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
project/project
2+
project/target
3+
target
4+
.idea
5+
.tmp
6+
7+
*.iml
8+
/out
9+
.idea_modules
10+
.classpath
11+
.project
12+
/RUNNING_PID
13+
.settings
14+
.sass-cache
15+
scalajvm/upload/*
16+
17+
# temp files
18+
.~*
19+
*~
20+
*.orig
21+
22+
# eclipse
23+
.scala_dependencies
24+
.buildpath
25+
.cache
26+
.target
27+
bin/
28+
.ensime
29+
.ensime_cache
30+
31+
# OSX
32+
.DS_Store
33+
34+
# PGP keys
35+
pubring.gpg
36+
secring.gpg

build.sbt

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
lazy val fpinscala = (project in file("."))
2+
.settings(publishSettings:_*)
3+
.enablePlugins(ExerciseCompilerPlugin)
4+
.settings(
5+
organization := "org.scala-exercises",
6+
name := "exercises-fpinscala",
7+
scalaVersion := "2.11.8",
8+
version := "0.2.1-SNAPSHOT",
9+
resolvers ++= Seq(
10+
Resolver.sonatypeRepo("snapshots"),
11+
Resolver.sonatypeRepo("releases")
12+
),
13+
libraryDependencies ++= Seq(
14+
"org.scalatest" %% "scalatest" % "2.2.4",
15+
"org.scala-exercises" %% "exercise-compiler" % version.value,
16+
"org.scala-exercises" %% "definitions" % version.value,
17+
"org.scalacheck" %% "scalacheck" % "1.12.5",
18+
"com.github.alexarchambault" %% "scalacheck-shapeless_1.12" % "0.3.1",
19+
compilerPlugin("org.spire-math" %% "kind-projector" % "0.7.1")
20+
)
21+
)
22+
23+
// Distribution
24+
25+
lazy val gpgFolder = sys.env.getOrElse("SE_GPG_FOLDER", ".")
26+
27+
lazy val publishSettings = Seq(
28+
organizationName := "Scala Exercises",
29+
organizationHomepage := Some(new URL("http://scala-exercises.org")),
30+
startYear := Some(2016),
31+
description := "Scala Exercises: The path to enlightenment",
32+
homepage := Some(url("http://scala-exercises.org")),
33+
pgpPassphrase := Some(sys.env.getOrElse("SE_GPG_PASSPHRASE", "").toCharArray),
34+
pgpPublicRing := file(s"$gpgFolder/pubring.gpg"),
35+
pgpSecretRing := file(s"$gpgFolder/secring.gpg"),
36+
credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", sys.env.getOrElse("PUBLISH_USERNAME", ""), sys.env.getOrElse("PUBLISH_PASSWORD", "")),
37+
scmInfo := Some(ScmInfo(url("https://github.com/scala-exercises/exercises-fpinscala"), "https://github.com/scala-exercises/exercises-fpinscala.git")),
38+
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
39+
publishMavenStyle := true,
40+
publishArtifact in Test := false,
41+
pomIncludeRepository := Function.const(false),
42+
publishTo := {
43+
val nexus = "https://oss.sonatype.org/"
44+
if (isSnapshot.value)
45+
Some("Snapshots" at nexus + "content/repositories/snapshots")
46+
else
47+
Some("Releases" at nexus + "service/local/staging/deploy/maven2")
48+
},
49+
pomExtra :=
50+
<developers>
51+
<developer>
52+
<id>jdesiloniz</id>
53+
<name>Javier de Silóniz</name>
54+
<email>javier.s.s@47deg.com</email>
55+
</developer>
56+
<developer>
57+
<id>juanpedromoreno</id>
58+
<name>Juan Pedro Moreno</name>
59+
<email>juanpedro.m@47deg.com</email>
60+
</developer>
61+
</developers>
62+
)

project/build.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sbt.version=0.13.11
2+

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.1.1", "0.13", "2.10")
2+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

0 commit comments

Comments
 (0)