Skip to content

Commit

Permalink
Remove publish module and command (#2446)
Browse files Browse the repository at this point in the history
The publish module has been migrated to
https://github.com/coursier/publish some time ago (and doesn't use
okhttp anymore there).

For the publish command, there's no 100% equivalent substitute. Scala
CLI (https://github.com/VirtusLab/scala-cli) got a publish command
recently, offering similar features.
  • Loading branch information
alexarchambault committed Jun 16, 2022
1 parent f8c2fc9 commit d34eeb3
Show file tree
Hide file tree
Showing 84 changed files with 1 addition and 7,569 deletions.
29 changes: 1 addition & 28 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ object cache extends Module {
object js extends Cross[CacheJs](ScalaVersions.all: _*)
}
object launcher extends Cross[Launcher](ScalaVersions.all ++ Seq(ScalaVersions.scala211): _*)
object publish extends Cross[Publish](ScalaVersions.all: _*)
object env extends Cross[Env](ScalaVersions.all: _*)
object `launcher-native_03` extends LauncherNative03
object `launcher-native_040M2` extends LauncherNative040M2
Expand Down Expand Up @@ -173,8 +172,6 @@ object `cli-tests` extends CliTests

object web extends Web

def publish0 = publish

class UtilJvm(val crossScalaVersion: String) extends UtilJvmBase {
def ivyDeps = super.ivyDeps() ++ Agg(
Deps.jsoup
Expand Down Expand Up @@ -268,29 +265,6 @@ class Launcher(val crossScalaVersion: String) extends LauncherBase {
def noProguardResourceBootstrap = `bootstrap-launcher`.resourceAssembly()
}

class Publish(val crossScalaVersion: String) extends CrossSbtModule with CsModule
with CoursierPublishModule with CsMima {
def artifactName = "coursier-publish"
def moduleDeps = Seq(
core.jvm(),
cache.jvm()
)
def ivyDeps = super.ivyDeps() ++ Agg(
Deps.argonautShapeless,
Deps.catsCore,
Deps.collectionCompat,
Deps.okhttp
)
def mimaPreviousVersions = T {
val previous = super.mimaPreviousVersions()
if (crossScalaVersion.startsWith("2.13."))
// this module wasn't published in 2.13 when coursier was built with sbt
previous.filter(_ != "2.0.16")
else
previous
}
}

class Env(val crossScalaVersion: String) extends CrossSbtModule with CsModule
with CoursierPublishModule with CsMima {
def mimaPreviousVersions = T {
Expand Down Expand Up @@ -542,8 +516,7 @@ trait Cli extends CsModule with CoursierPublishModule with Launchers {
install(cliScalaVersion),
jvm(cliScalaVersion),
launcherModule(cliScalaVersion),
`proxy-setup`,
publish0(cliScalaVersion)
`proxy-setup`
)
def ivyDeps = super.ivyDeps() ++ Agg(
Deps.argonautShapeless,
Expand Down
1 change: 0 additions & 1 deletion modules/cli/src/main/scala/coursier/cli/Coursier.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ object Coursier extends CommandsEntryPoint {
jvm.JavaHome,
launch.Launch,
install.List,
publish.Publish,
resolve.Resolve,
search.Search,
setup.Setup,
Expand Down
137 changes: 0 additions & 137 deletions modules/cli/src/main/scala/coursier/cli/publish/Hooks.scala

This file was deleted.

144 changes: 0 additions & 144 deletions modules/cli/src/main/scala/coursier/cli/publish/Input.scala

This file was deleted.

0 comments on commit d34eeb3

Please sign in to comment.