Skip to content

Build cleanup #11

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 2 commits into from
Nov 20, 2013
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
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
language: scala
script:
- sbt ++$TRAVIS_SCALA_VERSION 'set concurrentRestrictions in Global += Tags.limit(Tags.Compile, 2)' compile test:compile
- sbt ++$TRAVIS_SCALA_VERSION 'set concurrentRestrictions in Global += Tags.limit(Tags.Test, 1)' test
- sbt ++$TRAVIS_SCALA_VERSION clean update compile test
scala:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turns out we don't need this -- moved to comment below for when we hit said spurious errors

- 2.10.3
- 2.11.0-SNAPSHOT
jdk:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a mistake

- oraclejdk6
- openjdk7
notifications:
email:
- [email protected]

# if we get weird timeouts, see https://github.com/spray/spray/pull/233
# 'set concurrentRestrictions in Global += Tags.limit(Tags.Test, 1)'
23 changes: 15 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
import VersionKeys.{snapshotScalaBinaryVersion,deriveBinaryVersion}

organization := "org.scala-lang.modules"

name := "scala-parser-combinators"

version := "1.0.0-SNAPSHOT"

scalaVersion := "2.11.0-M6"
scalaVersion := "2.11.0-M7"

snapshotScalaBinaryVersion := "2.11.0-M7"

// DOUBLETHINK YOUR WAY OUT OF EDITING BELOW (THERE IS NO BELOW)

// NOTE: not necessarily equal to scalaVersion
// (e.g., during PR validation, we override scalaVersion to validate,
// but don't rebuild scalacheck, so we don't want to rewire that dependency)
scalaBinaryVersion := "2.11.0-M6"
scalaBinaryVersion := deriveBinaryVersion(scalaVersion.value, snapshotScalaBinaryVersion.value)

// to allow compiling against snapshot versions of Scala
resolvers += Resolver.sonatypeRepo("snapshots")


libraryDependencies ++= Seq(
"junit" % "junit" % "4.11" % "test",
"com.novocode" % "junit-interface" % "0.10" % "test")

// don't use for doc scope, scaladoc warnings are not to be reckoned with
scalacOptions in compile ++= Seq("-optimize", "-Xfatal-warnings", "-feature", "-deprecation", "-unchecked", "-Xlint")
// TODO: turn on for nightlies, but don't enable for PR validation... "-Xfatal-warnings"
scalacOptions in compile ++= Seq("-optimize", "-feature", "-deprecation", "-unchecked", "-Xlint")


// Generate $name.properties to store our version as well as the scala version used to build
Expand Down Expand Up @@ -81,8 +90,6 @@ pomExtra := (
</developers>
)

libraryDependencies ++= Seq("junit" % "junit" % "4.11" % "test", "com.novocode" % "junit-interface" % "0.10" % "test")

osgiSettings

val osgiVersion = version(_.replace('-', '.'))
Expand Down
13 changes: 8 additions & 5 deletions project/keys.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
object TestKeys {
object VersionKeys {
import sbt.settingKey

// for testing with partest
val includeTestDependencies = settingKey[Boolean]("Doesn't declare test dependencies.")
val snapshotScalaBinaryVersion = settingKey[String]("The Scala binary version to use when building against Scala SNAPSHOT.")

val partestVersion = settingKey[String]("Partest version.")
}
def deriveBinaryVersion(sv: String, snapshotScalaBinaryVersion: String) = sv match {
case snap_211 if snap_211.startsWith("2.11") &&
snap_211.contains("-SNAPSHOT") => snapshotScalaBinaryVersion
case sv => sbt.CrossVersion.binaryScalaVersion(sv)
}
}