summaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2016-01-29 15:42:16 -0500
committerSeth Tisue <seth@tisue.net>2016-01-29 15:42:16 -0500
commit3c26633f05d7b214d95ab7c859e94f08524172ca (patch)
tree33d91ca7d9818136b2db0b62793849769567b9d9 /build.sbt
parentea154faf467ae27c221ba0dcd7235e1e55673c51 (diff)
parentb1b54751cd4d96c102110bdbb512c729d1f618a5 (diff)
downloadscala-3c26633f05d7b214d95ab7c859e94f08524172ca.tar.gz
scala-3c26633f05d7b214d95ab7c859e94f08524172ca.tar.bz2
scala-3c26633f05d7b214d95ab7c859e94f08524172ca.zip
Merge pull request #4884 from szeiger/wip/sbt-pr-validation
sbt-based PR validation job
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt32
1 files changed, 26 insertions, 6 deletions
diff --git a/build.sbt b/build.sbt
index ad9d5c8866..829ca75d3b 100644
--- a/build.sbt
+++ b/build.sbt
@@ -53,7 +53,7 @@
* https://groups.google.com/d/topic/scala-internals/gp5JsM1E0Fo/discussion
*/
-import VersionUtil.{versionProps, versionNumber, generatePropertiesFileSettings, versionProperties, versionPropertiesSettings}
+import VersionUtil._
val bootstrapScalaVersion = versionProps("starr.version")
@@ -98,13 +98,27 @@ lazy val publishSettings : Seq[Setting[_]] = Seq(
(f, to)
}
IO.copy(mappings)
- }
+ },
+ credentials ++= {
+ val file = Path.userHome / ".credentials"
+ if (file.exists) List(Credentials(file))
+ else Nil
+ },
+ publishMavenStyle := true
)
-lazy val commonSettings = clearSourceAndResourceDirectories ++ versionPropertiesSettings ++ publishSettings ++ Seq[Setting[_]](
+// Set the version number: The ANT build uses the file "build.number" to get the base version. Overriding versions or
+// suffixes for certain builds is done by directly setting variables from the shell scripts. For example, in
+// publish-core this requires computing the commit SHA first and then passing it to ANT. In the sbt build we use
+// the two settings `baseVersion` and `baseVersionSuffix` to compute all versions (canonical, Maven, OSGi). See
+// VersionUtil.versionPropertiesImpl for details. The standard sbt `version` setting should not be set directly. It
+// is the same as the Maven version and derived automatically from `baseVersion` and `baseVersionSuffix`.
+globalVersionSettings
+baseVersion in Global := "2.11.8"
+baseVersionSuffix in Global := "SNAPSHOT"
+
+lazy val commonSettings = clearSourceAndResourceDirectories ++ publishSettings ++ Seq[Setting[_]](
organization := "org.scala-lang",
- // The ANT build uses the file "build.number" and the property "build.release" to compute the version
- version := "2.11.8-SNAPSHOT",
scalaVersion := bootstrapScalaVersion,
// we don't cross build Scala itself
crossPaths := false,
@@ -649,7 +663,13 @@ lazy val scalaDist = Project("scala-dist", file(".") / "target" / "scala-dist-di
lazy val root = (project in file("."))
.settings(disableDocs: _*)
- .settings(publishArtifact := false)
+ .settings(generateBuildCharacterFileSettings: _*)
+ .settings(
+ publishArtifact := false,
+ publish := {},
+ publishLocal := {},
+ commands ++= ScriptCommands.all
+ )
.aggregate(library, forkjoin, reflect, compiler, interactive, repl, replJline, replJlineEmbedded,
scaladoc, scalap, actors, partestExtras, junit, libraryAll, scalaDist).settings(
sources in Compile := Seq.empty,