Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Commit 8efeadd

Browse files
committed
Move build boilerplate to standard.sbt.
Turn off oraclejdk6 because Travis CI no longer supports it.
1 parent 97cb37a commit 8efeadd

File tree

3 files changed

+90
-86
lines changed

3 files changed

+90
-86
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ script:
44
scala:
55
- 2.11.0-SNAPSHOT
66
jdk:
7-
- oraclejdk6
87
- openjdk7
98
notifications:
109
email:

build.sbt

Lines changed: 15 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
import VersionKeys._
22

3+
organization := "org.scala-lang.modules"
34

4-
organization := "org.scala-lang.modules"
5+
name := "scala-partest"
56

6-
name := "scala-partest"
7+
version := "1.0.0-SNAPSHOT"
78

8-
version := "1.0.0-SNAPSHOT"
9+
scalaVersion := "2.11.0-M7"
910

10-
scalaVersion := "2.11.0-M6"
11+
scalaXmlVersion := "1.0.0-RC7"
1112

12-
snapshotScalaBinaryVersion := "2.11.0-M6"
13+
scalaCheckVersion := "1.11.1"
1314

14-
scalaXmlVersion := "1.0.0-RC6"
15+
// used as binary version when compiling against 2.11.0-SNAPSHOT
16+
snapshotScalaBinaryVersion := "2.11.0-M7"
1517

16-
scalaCheckVersion := "1.10.1"
17-
18-
// DOUBLETHINK YOUR WAY OUT OF EDITING BELOW (THERE IS NO BELOW)
19-
20-
scalaBinaryVersion := deriveBinaryVersion(scalaVersion.value, snapshotScalaBinaryVersion.value)
21-
22-
// so we don't have to wait for sonatype to synch to maven central when deploying a new module
23-
resolvers += Resolver.sonatypeRepo("releases")
24-
25-
// to allow compiling against snapshot versions of Scala
26-
resolvers += Resolver.sonatypeRepo("snapshots")
18+
// TODO: enable "-Xfatal-warnings" for nightlies,
19+
// off by default because we don't want to break scala/scala pr validation due to deprecation
20+
// don't use for doc scope, scaladoc warnings are not to be reckoned with
21+
scalacOptions in (Compile, compile) ++= Seq("-optimize", "-feature", "-deprecation", "-unchecked", "-Xlint")
2722

28-
// dependencies:
23+
// dependencies
24+
// versions involved in integration builds / that change frequently should be keys, set above!
2925
libraryDependencies += "org.apache.ant" % "ant" % "1.8.4"
3026

3127
libraryDependencies += "com.googlecode.java-diff-utils" % "diffutils" % "1.3.0"
@@ -46,70 +42,4 @@ libraryDependencies += "org.scala-lang" % "scala-reflect" % sca
4642

4743
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided" intransitive()
4844

49-
// don't use for doc scope, scaladoc warnings are not to be reckoned with
50-
// "-Xfatal-warnings",
51-
scalacOptions in (Compile, compile) ++= Seq("-optimize", "-feature", "-deprecation", "-unchecked", "-Xlint")
52-
53-
54-
// Generate $name.properties to store our version as well as the scala version used to build
55-
// TODO: why doesn't this work for scala-partest.properties?? (After updating def propCategory in Properties, of course)
56-
resourceGenerators in Compile <+= Def.task {
57-
val props = new java.util.Properties
58-
props.put("version.number", version.value)
59-
props.put("scala.version.number", scalaVersion.value)
60-
props.put("scala.binary.version.number", scalaBinaryVersion.value)
61-
val file = (resourceManaged in Compile).value / "partest.properties"
62-
IO.write(props, null, file)
63-
Seq(file)
64-
}
65-
66-
mappings in (Compile, packageBin) += {
67-
(baseDirectory.value / "partest.properties") -> "partest.properties"
68-
}
69-
70-
71-
// maven publishing
72-
publishTo := {
73-
val nexus = "https://oss.sonatype.org/"
74-
if (version.value.trim.endsWith("SNAPSHOT"))
75-
Some("snapshots" at nexus + "content/repositories/snapshots")
76-
else
77-
Some("releases" at nexus + "service/local/staging/deploy/maven2")
78-
}
79-
80-
publishMavenStyle := true
81-
82-
publishArtifact in Test := false
83-
84-
pomIncludeRepository := { _ => false }
85-
86-
pomExtra := (
87-
<url>http://www.scala-lang.org/</url>
88-
<inceptionYear>2002</inceptionYear>
89-
<licenses>
90-
<license>
91-
<distribution>repo</distribution>
92-
<name>BSD 3-Clause</name>
93-
<url>https://github.com/scala/{name.value}/blob/master/LICENSE.md</url>
94-
</license>
95-
</licenses>
96-
<scm>
97-
<connection>scm:git:git://github.com/scala/{name.value}.git</connection>
98-
<url>https://github.com/scala/{name.value}</url>
99-
</scm>
100-
<issueManagement>
101-
<system>JIRA</system>
102-
<url>https://issues.scala-lang.org/</url>
103-
</issueManagement>
104-
<developers>
105-
<developer>
106-
<id>epfl</id>
107-
<name>EPFL</name>
108-
</developer>
109-
<developer>
110-
<id>Typesafe</id>
111-
<name>Typesafe, Inc.</name>
112-
</developer>
113-
</developers>
114-
)
115-
45+
// the boilerplate is in standard.sbt

standard.sbt

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import VersionKeys._
2+
3+
// DOUBLETHINK YOUR WAY OUT OF EDITING BELOW (THERE IS NO BELOW)
4+
5+
scalaBinaryVersion := deriveBinaryVersion(scalaVersion.value, snapshotScalaBinaryVersion.value)
6+
7+
// so we don't have to wait for sonatype to synch to maven central when deploying a new module
8+
resolvers += Resolver.sonatypeRepo("releases")
9+
10+
// to allow compiling against snapshot versions of Scala
11+
resolvers += Resolver.sonatypeRepo("snapshots")
12+
13+
14+
// Generate $name.properties to store our version as well as the scala version used to build
15+
// TODO: why doesn't this work for scala-partest.properties?? (After updating def propCategory in Properties, of course)
16+
resourceGenerators in Compile <+= Def.task {
17+
val props = new java.util.Properties
18+
props.put("version.number", version.value)
19+
props.put("scala.version.number", scalaVersion.value)
20+
props.put("scala.binary.version.number", scalaBinaryVersion.value)
21+
val file = (resourceManaged in Compile).value / "partest.properties"
22+
IO.write(props, null, file)
23+
Seq(file)
24+
}
25+
26+
mappings in (Compile, packageBin) += {
27+
(baseDirectory.value / "partest.properties") -> "partest.properties"
28+
}
29+
30+
31+
// maven publishing
32+
publishTo := {
33+
val nexus = "https://oss.sonatype.org/"
34+
if (version.value.trim.endsWith("SNAPSHOT"))
35+
Some("snapshots" at nexus + "content/repositories/snapshots")
36+
else
37+
Some("releases" at nexus + "service/local/staging/deploy/maven2")
38+
}
39+
40+
publishMavenStyle := true
41+
42+
publishArtifact in Test := false
43+
44+
pomIncludeRepository := { _ => false }
45+
46+
pomExtra := (
47+
<url>http://www.scala-lang.org/</url>
48+
<inceptionYear>2002</inceptionYear>
49+
<licenses>
50+
<license>
51+
<distribution>repo</distribution>
52+
<name>BSD 3-Clause</name>
53+
<url>https://github.com/scala/{name.value}/blob/master/LICENSE.md</url>
54+
</license>
55+
</licenses>
56+
<scm>
57+
<connection>scm:git:git://github.com/scala/{name.value}.git</connection>
58+
<url>https://github.com/scala/{name.value}</url>
59+
</scm>
60+
<issueManagement>
61+
<system>JIRA</system>
62+
<url>https://issues.scala-lang.org/</url>
63+
</issueManagement>
64+
<developers>
65+
<developer>
66+
<id>epfl</id>
67+
<name>EPFL</name>
68+
</developer>
69+
<developer>
70+
<id>Typesafe</id>
71+
<name>Typesafe, Inc.</name>
72+
</developer>
73+
</developers>
74+
)
75+

0 commit comments

Comments
 (0)