|
| 1 | +organization := "org.scala-lang" |
| 2 | + |
| 3 | +name := "scala-xml" |
| 4 | + |
| 5 | +version := "1.0-RC1" |
| 6 | + |
| 7 | +scalaVersion := "2.11.0-M4" |
| 8 | + |
| 9 | +scalaBinaryVersion := scalaVersion.value |
| 10 | + |
| 11 | +libraryDependencies += "org.apache.ant" % "ant" % "1.8.4" |
| 12 | + |
| 13 | +libraryDependencies += "com.googlecode.java-diff-utils" % "diffutils" % "1.3.0" |
| 14 | + |
| 15 | +libraryDependencies += "org.scala-lang" % "scala-xml" % "2.11.0-M4" |
| 16 | + |
| 17 | +libraryDependencies += "org.scala-lang" % "scalap" % "2.11.0-M4" |
| 18 | + |
| 19 | +libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.10.1" |
| 20 | + |
| 21 | +libraryDependencies += "org.scala-sbt" % "test-interface" % "1.0" |
| 22 | + |
| 23 | + |
| 24 | +// xml.properties |
| 25 | +resourceGenerators in Compile <+= Def.task { |
| 26 | + val props = new java.util.Properties |
| 27 | + props.put("version.number", version.value) |
| 28 | + props.put("scala.version.number", scalaVersion.value) |
| 29 | + val file = (resourceManaged in Compile).value / "xml.properties" |
| 30 | + IO.write(props, null, file) |
| 31 | + Seq(file) |
| 32 | +} |
| 33 | + |
| 34 | +mappings in (Compile, packageBin) += { |
| 35 | + (baseDirectory.value / "xml.properties") -> "xml.properties" |
| 36 | +} |
| 37 | + |
| 38 | + |
| 39 | +// maven publishing |
| 40 | +publishTo := { |
| 41 | + val nexus = "https://oss.sonatype.org/" |
| 42 | + if (version.value.trim.endsWith("SNAPSHOT")) |
| 43 | + Some("snapshots" at nexus + "content/repositories/snapshots") |
| 44 | + else |
| 45 | + Some("releases" at nexus + "service/local/staging/deploy/maven2") |
| 46 | +} |
| 47 | + |
| 48 | +publishMavenStyle := true |
| 49 | + |
| 50 | +publishArtifact in Test := false |
| 51 | + |
| 52 | +pomIncludeRepository := { _ => false } |
| 53 | + |
| 54 | +pomExtra := ( |
| 55 | + <url>http://www.scala-lang.org/</url> |
| 56 | + <inceptionYear>2002</inceptionYear> |
| 57 | + <licenses> |
| 58 | + <license> |
| 59 | + <name>BSD-like</name> |
| 60 | + <url>http://www.scala-lang.org/downloads/license.html |
| 61 | + </url> |
| 62 | + <distribution>repo</distribution> |
| 63 | + </license> |
| 64 | + </licenses> |
| 65 | + <scm> |
| 66 | + <connection>scm:git:git://github.com/scala/scala-xml.git</connection> |
| 67 | + <url>https://github.com/scala/scala-xml</url> |
| 68 | + </scm> |
| 69 | + <issueManagement> |
| 70 | + <system>JIRA</system> |
| 71 | + <url>https://issues.scala-lang.org/</url> |
| 72 | + </issueManagement> |
| 73 | + <developers> |
| 74 | + <developer> |
| 75 | + <id>lamp</id> |
| 76 | + <name>EPFL LAMP</name> |
| 77 | + </developer> |
| 78 | + <developer> |
| 79 | + <id>Typesafe</id> |
| 80 | + <name>Typesafe, Inc.</name> |
| 81 | + </developer> |
| 82 | + </developers> |
| 83 | +) |
| 84 | + |
| 85 | +// for testing with partest |
| 86 | +libraryDependencies += "org.scala-lang" %% "scala-partest-interface" % "0.1" % "test" |
| 87 | + |
| 88 | +// the actual partest the interface calls into -- must be binary version close enough to ours |
| 89 | +// so that it can link to the compiler/lib we're using (testing) |
| 90 | +libraryDependencies += "org.scala-lang" %% "scala-partest" % "1.0-RC1" % "test" |
| 91 | + |
| 92 | +fork in Test := true |
| 93 | + |
| 94 | +javaOptions in Test += "-Xmx1G" |
| 95 | + |
| 96 | +testFrameworks += new TestFramework("scala.tools.partest.Framework") |
| 97 | + |
| 98 | +definedTests in Test += ( |
| 99 | + new sbt.TestDefinition( |
| 100 | + "partest", |
| 101 | + // marker fingerprint since there are no test classes |
| 102 | + // to be discovered by sbt: |
| 103 | + new sbt.testing.AnnotatedFingerprint { |
| 104 | + def isModule = true |
| 105 | + def annotationName = "partest" |
| 106 | + }, true, Array()) |
| 107 | + ) |
| 108 | + |
| 109 | + |
| 110 | +// TODO: mima |
| 111 | +// import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings |
| 112 | +// import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact |
| 113 | +// previousArtifact := Some("org.scala-lang" % "partest_2.11.0-M4" % "1.0") |
0 commit comments