Skip to content
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

Provide a way to enable plugins per platform #52

Open
thesamet opened this issue May 1, 2021 · 1 comment
Open

Provide a way to enable plugins per platform #52

thesamet opened this issue May 1, 2021 · 1 comment

Comments

@thesamet
Copy link

thesamet commented May 1, 2021

It would be desirable to have a way (or if one already exists to document it), to enable an sbt plugin for a specific platform in the matrix. For example, scalajs-bundler's instructions suggest to install like this:

lazy val cross = crossProject(JSPlatform, JVMPlatform).in(file("."))
  .jvmSettings(BuildSettings.jvmSettings)
  .jsSettings(BuildSettings.jsSettings)
  .jsConfigure { project => project.enablePlugins(ScalaJSBundlerPlugin) }

It looks like the only way in sbt-projectmatrix right now to transform a Project is by calling customRow() directly, however that would require me to copy-paste the definition of jsPlatform in my own SBT build and modify it accordingly.

@sirthias
Copy link

To underline the point:
It doesn't make sense to have plugins like sbt-scalafmt or sbt-header enabled for all sub-projects/modules that share the same sources files. To complicate the matter: it does make sense to run those plugins on the source directories that are specific to the respective scala version or platform, i.e. /scala-2.13 or /scalajs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants