Skip to content

Updated build infrastructure to support Maven Central publication #4432

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
Jul 8, 2025
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
35 changes: 23 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

import java.io.File
import java.util.concurrent.TimeUnit

import com.typesafe.tools.mima.core._
import com.github.sbt.git.SbtGit.GitKeys._
Expand Down Expand Up @@ -46,7 +45,6 @@ ThisBuild / tlUntaggedAreSnapshots := false

ThisBuild / organization := "org.typelevel"
ThisBuild / organizationName := "Typelevel"
ThisBuild / tlSonatypeUseLegacyHost := false

ThisBuild / startYear := Some(2020)

Expand Down Expand Up @@ -331,18 +329,31 @@ val CoopVersion = "1.2.0"

val MacrotaskExecutorVersion = "1.1.1"

tlReplaceCommandAlias("ci", CI.AllCIs.map(_.toString).mkString)
addCommandAlias("release", "tlRelease")
Global / tlCommandAliases ++= Map(
CI.JVM.commandAlias,
CI.Native.commandAlias,
CI.JS.commandAlias,
CI.Firefox.commandAlias,
CI.Chrome.commandAlias
)

Global / tlCommandAliases ++= Map(
"ci" -> CI.AllCIs.flatMap(_.commands)
)

addCommandAlias(CI.JVM.command, CI.JVM.toString)
addCommandAlias(CI.Native.command, CI.Native.toString)
addCommandAlias(CI.JS.command, CI.JS.toString)
addCommandAlias(CI.Firefox.command, CI.Firefox.toString)
addCommandAlias(CI.Chrome.command, CI.Chrome.toString)
Global / tlCommandAliases ++= Map(
"release" -> List("tlRelease")
)

tlReplaceCommandAlias(
"prePR",
"; root/clean; +root/headerCreate; root/scalafixAll; scalafmtSbt; +root/scalafmtAll")
Global / tlCommandAliases ++= Map(
"prePR" -> List(
"root/clean",
"+root/headerCreate",
"root/scalafixAll",
"scalafmtSbt",
"+root/scalafmtAll"
)
)

val jsProjects: Seq[ProjectReference] =
Seq(
Expand Down
33 changes: 17 additions & 16 deletions project/CI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,25 @@ sealed abstract class CI(
scaladoc: Boolean,
suffixCommands: List[String]) {

override val toString: String = {
val commands =
(List(
"scalafmtSbtCheck",
s"project $rootProject",
jsEnv.fold("")(env => s"set Global / useJSEnv := JSEnv.$env"),
"headerCheck",
"scalafmtCheckAll",
"javafmtCheckAll",
"clean"
) ++ testCommands ++ List(
jsEnv.fold("")(_ => s"set Global / useJSEnv := JSEnv.NodeJS"),
if (mimaReport) "mimaReportBinaryIssues" else "",
if (scaladoc) "doc" else ""
)).filter(_.nonEmpty) ++ suffixCommands
val commands: List[String] =
(List(
s"project $rootProject",
jsEnv.fold("")(env => s"set Global / useJSEnv := JSEnv.$env"),
"headerCheck",
"scalafmtSbtCheck",
"scalafmtCheckAll",
"javafmtCheckAll",
"clean"
) ++ testCommands ++ List(
jsEnv.fold("")(_ => s"set Global / useJSEnv := JSEnv.NodeJS"),
if (mimaReport) "mimaReportBinaryIssues" else "",
if (scaladoc) "doc" else ""
)).filter(_.nonEmpty) ++ suffixCommands

val commandAlias: (String, List[String]) = command -> commands

override val toString: String =
commands.mkString("; ", "; ", "")
}
}

object CI {
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.10.7
sbt.version=1.11.2
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
libraryDependencies += "org.scala-js" %% "scalajs-env-selenium" % "1.1.1"

addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.5")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.8.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17")
Expand Down
Loading