Skip to content
Open
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
62 changes: 1 addition & 61 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import ReleaseTransformations._

// Latest version numbers were updated on 2026-04-24.
val scala211 = "2.11.12" // up to 2.11.12
Expand All @@ -7,15 +6,11 @@ val scala213 = "2.13.18" // up to 2.13.18
val scala31 = "3.1.3" // up to 3.1.3
// Only the LTS versions are listed next.
val scala33 = "3.3.7" // up to 3.3.7
val scala3 = scala31
val scala3 = scala33
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AFAIK no library needs scala33 and scala31 will not force others to update to 3.3 in case those people exist. They might be us.


ThisBuild / crossScalaVersions := Seq(scala212, scala211, scala213, scala3)
ThisBuild / scalaVersion := scala212

name := "nxmlreader"

organization := "ai.lum"

scalacOptions ++= {
val noAdaptedArgsOpt = CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 11)) => Some("-Yno-adapted-args")
Expand Down Expand Up @@ -70,58 +65,3 @@ libraryDependencies ++= {
)
}

releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
releaseStepCommandAndRemaining("+test"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommandAndRemaining("sonatypeReleaseAll"),
pushChanges
)

// Publishing settings

publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

publishMavenStyle := true

publishArtifact in Test := false

pomIncludeRepository := { _ => false }

pomExtra :=
<url>https://github.com/lum-ai/nxmlreader</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<url>scm:git:github.com/lum-ai/nxmlreader</url>
<connection>scm:git:git@github.com:lum-ai/nxmlreader.git</connection>
</scm>
<developers>
<developer>
<id>marcovzla</id>
<name>Marco Antonio Valenzuela Escárcega</name>
<url>lum.ai</url>
</developer>
<developer>
<id>ghp</id>
<name>Gus Hahn-Powell</name>
<url>lum.ai</url>
</developer>
</developers>
4 changes: 3 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Latest version numbers were updated on 2026-04-24.
// Latest version numbers were updated on 2026-05-05.
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") // up to 2.3.1
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0") // up to 1.4.0
// For constructing the fat jar:
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1") // up to 2.3.1
62 changes: 62 additions & 0 deletions publish.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import org.clulab.sbt.DependencyFilter
import org.clulab.sbt.DependencyId

import scala.xml.Node
import scala.xml.transform.RuleTransformer

val publication = "nxmlreader"

ThisBuild / developers := List(
Developer(
id = "mihai.surdeanu",
name = "Mihai Surdeanu",
email = "mihai@surdeanu.info",
url = url("https://www.cs.arizona.edu/person/mihai-surdeanu")
)
)
ThisBuild / homepage := Some(url(s"https://github.com/clulab/$publication"))
ThisBuild / licenses := List(
"Apache License, Version 2.0" ->
url("http://www.apache.org/licenses/LICENSE-2.0.html")
)
ThisBuild / organization := "org.clulab"
ThisBuild / organizationHomepage := Some(url("http://clulab.org/"))
ThisBuild / organizationName := "Computational Language Understanding (CLU) Lab"
// The sonatype plugin seems to overwrite these two values.
// ThisBuild / pomIncludeRepository := { _ => false } // no longer applicable in sbt 1.6.2+
ThisBuild / pomPostProcess := {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some of this is not relevant. It is used to remove logging from the library dependencies. Additional code would need to be in the project directory.

val logback = DependencyId("ch.qos.logback", "logback-classic")
val rule = DependencyFilter { dependencyId =>
dependencyId != logback
}

(node: Node) => new RuleTransformer(rule).transform(node).head
}
// ThisBuild / publishMavenStyle := true // no longer applicable in sbt 1.6.2+
ThisBuild / publishTo := {
val useArtifactory = false

if (useArtifactory) {
val artifactory = "https://artifactory.clulab.org/artifactory/"
val repository = "sbt-release-local"
val details =
if (isSnapshot.value) ";build.timestamp=" + new java.util.Date().getTime
else ""
val location = artifactory + repository + details

Some("Artifactory Realm" at location)
}
else {
if (isSnapshot.value)
Some("central-snapshots" at "https://central.sonatype.com/repository/maven-snapshots/")
else
localStaging.value
}
}
ThisBuild / scmInfo := Some(
ScmInfo(
url(s"https://github.com/clulab/$publication"),
s"scm:git@github.com:clulab/$publication.git"
)
)
ThisBuild / versionScheme := Some("semver-spec")
19 changes: 19 additions & 0 deletions release.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import ReleaseTransformations._

releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommandAndRemaining("sonaUpload"),
setNextVersion,
commitNextVersion,
// pushChanges
)

Global / onChangedBuildSource := ReloadOnSourceChanges
Global / useGpg := false // GPG doesn't need to be installed, particularly for Windows.