Questions tagged [sbt-plugin]

A plugin extends the build definition, most commonly by adding new settings. The new settings could be new tasks. For example, a plugin could add a codeCoverage task which would generate a test coverage report.

An SBT plugin extends the build definition, most commonly by adding new settings. The new settings could be new tasks. For example, a plugin could add a codeCoverage task which would generate a test coverage report.

192 questions
36
votes
4 answers

IntelliJ IDEA - sbt plugin - 'Expression type Def.Setting[...] must conform DslEntry in sbt file'

I looked for similar questions, I found this: Expression type DslEntry must conform to Def.SettingsDefinition in SBT file at line enablePlugins(JavaServerAppPackaging) My issue is similar, but happens in every row. When I try to run, it compiles…
Rafael Leal
  • 461
  • 4
  • 6
17
votes
2 answers

how to prevent gitlab ci from downloading sbt every time?

We have a play2/scala application which we are building with gitlab ci. Our .gitlab-ci.yml (at least the important part) looks as follows: image: hseeberger/scala-sbt variables: SBT_GLOBAL_BASE_DIR: "$CI_PROJECT_DIR/cache/.sbt" IVY2_CACHE_DIR:…
stubbi
  • 233
  • 2
  • 9
13
votes
1 answer

What's the relationship of the versions of scala when I use sbt to build a scala project?

I'm building a scala project(writen in scala 2.11) with SBT 1.x.There are a few "versions of scala" which made me puzzle. SBT 1.x => scala 2.12 SBT plugin => scala 2.x My project => scala 2.11 Please help me to figure out what's the…
dukyz
  • 347
  • 1
  • 2
  • 12
11
votes
2 answers

Scala: IntelliJ highlights correct code in red

One fine day IntelliJ started highlighting my working Scala code in red. While following commands run without a hitch, IntelliJ thinks that code is full of errors an missing a lot of dependencies. sbt clean sbt reload sbt update sbt compile sbt…
y2k-shubham
  • 10,183
  • 11
  • 55
  • 131
11
votes
1 answer

SBT Plugins: Is it possible to run scripted for a single test instead of running all tests?

I have 5 scripted tests to test my sbt plugin. All of them take long to run. I sometimes want to run just one of the tests. Is it possible to specify to scripted which test to run?
marios
  • 8,874
  • 3
  • 38
  • 62
10
votes
5 answers

Can't find SBT-shell in IntelliJ IDEA

Facing some issue with the build, I deleted the project and .idea directories of my SBT project (containing submodules) followed by Invalidate Caches / Restart... (invalidated the cache too) Ever since relaunch of IntelliJ, I can't locate the sbt…
y2k-shubham
  • 10,183
  • 11
  • 55
  • 131
10
votes
2 answers

Bundle imports in Scala

In my Scala project, almost all my files have these imports: import eu.timepit.refined._ import eu.timepit.refined.api.Refined import eu.timepit.refined.auto._ import eu.timepit.refined.numeric._ import spire.math._ import spire.implicits._ import…
pathikrit
  • 32,469
  • 37
  • 142
  • 221
9
votes
4 answers

sbt assembly cannot create jar getting java.lang.UnsupportedOperationException

I am using scala 1.12.10 akka 2.6.3 addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.1.0") However when executing sbt assembly I am getting: java.lang.UnsupportedOperationException: The Security…
igx
  • 4,101
  • 11
  • 43
  • 88
8
votes
1 answer

troubleshooting jar loading conflicts in sbt

I get the following error on sbt startup, when two specific sbt plugins are added together to a project in its build definition. One of these sbt plugins is scalikejdbc and the other is my own, and clearly their mutual inclusion in a project's build…
matanster
  • 15,072
  • 19
  • 88
  • 167
8
votes
1 answer

SBT - How to disable a plugin for a specific task (e.g. "package")

Is there a way to disable a SBT plugin (an AutoPlugin) for a specific task. For example, i would like to disable the plugin SCoverage while packaging. I tried with: coverageEnabled in `package` := false But that does not work. So I look for a way…
Mat
  • 81
  • 2
7
votes
1 answer

Can one disable the sbt 1.x server?

Some of my builds and plugins make use of private deployment credentials (sometimes read from the file system, sometimes entered and retained in memory via the InteractionService). Though perhaps it is overparanoid, I try to be careful to minimize…
Steve Waldman
  • 13,689
  • 1
  • 35
  • 45
6
votes
1 answer

IntelliJ IDEA unable to find credentials for Artifactory

I am using IntelliJ IDEA ultimate to import an SBT project that has some plugins in a private Artifactory. [info] Resolving com.private#XXXX_X.X;X.X.X-SNAPSHOT ... [error] Unable to find credentials for [Artifactory Realm @…
vkt
  • 1,401
  • 2
  • 20
  • 46
6
votes
1 answer

SBT Subprojects do not recognize plugin commands

I'm having an issue with getting SBT Subprojects to recognize commands provided by plugins. I have the following plugin source: object DemoPlugin extends AutoPlugin { override lazy val projectSettings = Seq(commands += demoCommand) lazy val…
Robert Grider
  • 261
  • 1
  • 7
5
votes
3 answers

running sbt command on the meta-build level

sbt allows us to run sbt commands on the root project level. How can I run commands on the meta-build level? (that is defined in root/project/project dir) my use case is that some of my sbt plugins have different versions of the same dependency,…
lev
  • 3,986
  • 4
  • 33
  • 46
5
votes
2 answers

IntelliJ Idea can't resolve symbol that inside Scala managed sources (sbt-buildinfo)

I think it could be a problem that appeared in new versions, and can't be resolved as old versions, I got a Play Java project with sbt-buildinfo plugin the problem is really common is that IntelliJ keep saying it can't resolve that symbol And here…
Al-Mothafar
  • 7,949
  • 7
  • 68
  • 102
1
2 3
12 13