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
1
vote
2 answers

How to use sbt-assembly in sbt-plugin?

I am writing an sbt-plugin to abstract away some boilerplate. Let's call it sbt-redux then there is one more plugin sbt-assembly. In this quest, my plugin(sbt-redux) needs to know about where the project ( Project which is using sbt-redux ) will…
arglee
  • 1,374
  • 4
  • 17
  • 30
1
vote
1 answer

How to collect all the values for a SettingKey across all projects for use in an sbt plugin?

I am trying to collect the set of values for libraryDependencies across all projects/scopes/etc in an sbt 1.x build. What is the right way to accomplish this?
Brian Kent
  • 3,754
  • 1
  • 26
  • 31
1
vote
1 answer

Do I need to cross-build my SBT plugin to both 1.0 and 1.1?

I have an SBT plugin that, in the past, I cross-built to 0.13.16 and 1.0.2. I'm going to release a new version soon, and I want to update these versions. Is it sufficient to say this? crossSbtVersions := Vector("0.13.17", "1.1.6") Or do I need to…
john sullivan
  • 1,898
  • 2
  • 13
  • 21
1
vote
1 answer

Override a version of transitive dependency in sbt

I have a requirement to override a transitive dependency to a later version of the same. In maven I can do this by simply adding the overriding one on top. com.fasterxml.jackson.core
Srinivas
  • 2,010
  • 7
  • 26
  • 51
1
vote
1 answer

Unresolved Dependencies sbt with play framework

As i am new to Stack Overflow please be patient i am working on a project with Play 2.5 exactly the starter example from the Website. As i have to work with ebean i followed the Steps of Setting ebean in the plugins.sbt as…
Denis P
  • 29
  • 1
  • 5
1
vote
0 answers

sbt error ClassNotFoundException in WordCount

it might be a newbie question but i'm trying to learn more about scala in intellij. I firstly created a simple HelloWorld project that worked fine. Next i watched a tutorial to create a WordCount project, but i'm getting exception error that i can't…
user3121051
  • 21
  • 1
  • 6
1
vote
0 answers

Using playframework without sbt plugin

I like playframework, but I don't like sbt. Finally there's a good alternative: mill; but I cannot use it with Playframework because, regardless of the minimality of it, play is more than just a couple of libraries. Play is an sbt plugin, which I'm…
caeus
  • 3,084
  • 1
  • 22
  • 36
1
vote
0 answers

Should plugins cache Initialize[Task[T]] objects?

By trial and probably error, as a plugin author I've fallen into using the following style, which seems to work: object AmazingPlugin extends AutoPlugin { object autoImport { val amaze = TaskKey[Amazement]("Do something totally effing…
Steve Waldman
  • 13,689
  • 1
  • 35
  • 45
1
vote
1 answer

sbt key gets automatically capitalized after migration to sbt 1

I'm migrating an sbt plugin from 0.13 to 1.0.4 The plugin defines an InputKey in the following way: lazy val myKey = InputKey[Unit]("foo-bar", "") To use this key, I would run (from sbt console): foo-bar but after upgrading to sbt 1.0.4, I'm…
lev
  • 3,986
  • 4
  • 33
  • 46
1
vote
1 answer

How to append settings to a sbt project?

I have my build.sbt file like this: ./build.sbt lazy val root = (project in file(".") .settings(libraryDependencies ++= Seq(...)) and a second file (in the same folder) like this: ./release.sbt lazy val releaseStuff: Def.Setting[Task[Unit]] =…
gurghet
  • 7,591
  • 4
  • 36
  • 63
1
vote
0 answers

SBT: Rename a project file before its added to Fat Jar

I have a file by the name 'app.settings' which I have to rename to 'settings.conf' before it's packaged as a part of Uber Jar. I am using SBT assembly plugin to create Fat jar. Does Uber Jar allow me to rename files? Or is there another way?
Constantine
  • 1,356
  • 14
  • 19
1
vote
0 answers

Couldn't resolve dependencies with sbt-coursier

I'm using sbt-coursier plugin for resolve the dependencies of my project and my problem is when I'm trying to add a project reference like this lazy val some-lib = ProjectRef(uri("ssh://git@github.com/aaa/project.git#sdaf"), "lib") It doesn't…
1
vote
1 answer

onstart method of Global.java getting executed twice after upgrading playframework to 2.4.6

I have just upgraded my application from play framework 2.3.9 to 2.4.6. Everything is working fine, but onstart(Application app) method getting executed twice. As i have created some scheduler in the onstart method, they are also getting executed…
gkbstar
  • 615
  • 1
  • 6
  • 16
1
vote
1 answer

Run tests before sbt dist in sbt-native-packager

I don't wanna create any deployable without running tests. Is there anyway in sbt-native-packager / sbt where I could run sbt test in inside sbt dist, which would fail when any test fails?
N A
  • 831
  • 2
  • 8
  • 28
1
vote
1 answer

Slow compilation with SBT

As mentioned by the lightbend devs, the activator is EOL-ed, so I switched to SBT. I downloaded version 0.13.15, installed it and started clean/compile in my project via terminal. The compilation took 535 seconds with SBT but with activator it was…
Yeti
  • 63
  • 7