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
2
votes
1 answer

generate resources from an AutoPlugin in sbt

I have created the following plugin, like so many plugins before it... /** * This plugin automatically generates a version number based on the configured * minor version and today's date and time. */ object DateVersionPlugin extends AutoPlugin { …
Scott S. McCoy
  • 1,117
  • 11
  • 11
2
votes
0 answers

Adding a Configuration at runtime

I'd like to add a configuration within a plugin at runtime and probably also register it at projectConfigurations. Is there a possibility to manipulate the state in such a way? I assume this needs to be done in a command, and the solution is buried…
Taig
  • 6,718
  • 4
  • 44
  • 65
2
votes
1 answer

SBT Plugin that adds Plugins

I am creating a plugin for my organization that provides a framework to quickly create new services. As part of this there are several plugins that all projects should have. While I could just create a template for this and create each new…
user131441
2
votes
0 answers

IntelliJ Idea error "Module 'api' production: java.lang.AbstractMethodError"

For some reason I get this error when I am trying to build an SBT project. IntelliJ version: 13.1.5 (just updated) Scala plugin version: 0.41.2 SBT plugin: 1.6.1 Error:Module 'api' production:…
Balint Pato
  • 1,497
  • 1
  • 13
  • 28
2
votes
1 answer

How do I modify sourceGenerators in Compile from an AutoPlugin?

I'm writing a code generation plugin for sbt using the new AutoPlugin mechanism. I need to modify the sourceGenerators in Compile setting but somehow it does not work when I do it from the plugin. After calling compile, nothing is printed on the…
mundacho
  • 229
  • 1
  • 8
2
votes
2 answers

SBT plugin - User defined configuration for Command via their build.sbt

I'm writing an SBT Plugin that adds a Command and would like users to be able to configure this Command by setting variables in their build.sbt. What is the simplest way to achieve this? Here is an simplified example of what the Plugin looks…
theon
  • 14,170
  • 5
  • 51
  • 74
1
vote
1 answer

SBT Resolving issues with Internal Repository

We're trying to build an SBT Project using only our internal company Artifactory. Therefore we copied all required dependencies from the original repositories to ours, maintaining the URL paths. This has worked fine for all repositories except this…
Philipp Murry
  • 1,660
  • 9
  • 13
1
vote
1 answer

SBT Error downloading io.spray:sbt-revolver

(update) sbt.librarymanagement.ResolveException: Error downloading io.spray:sbt-revolver;sbtVersion=1.0;scalaVersion=2.12:0.9.1 [error] Not found [error] Not found [error] not found:…
Maftunbek
  • 13
  • 2
1
vote
0 answers

Sbt Remote Caching Looses Some Data

I am trying to use Sbt Remote Caching with Sbt Scoverage that generates a test coverage report. The problem is that the data from the coverage report is being lost when the data is being pushed/pulled and I get the following error: …
1
vote
1 answer

Sbt in project plugin, how to structure them?

We do have a custom plugin as a single file in our project folder: acme-project |- ... |- project | |- CustomPlugin.scala object CustomPlugin extends AutoPlugin { // ... That was simple and easy until that plugin started to grow... In the…
gervais.b
  • 2,294
  • 2
  • 22
  • 46
1
vote
0 answers

Logging from custom SBT plugin not working

At work we've created this plugin, and from one of its inputKey it's suppose to log an exception (whenever that occurs). For demonstration purposes I've only used the relevant stuff, so have a look at the following code: theTask := { …
Davey
  • 447
  • 2
  • 7
  • 27
1
vote
2 answers

SBT run with provided works under the '.' projects but fails with no mercy under any subprojects

I'm working with latest sbt.version=1.5.7. My assembly.sbt is nothing more than addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.1.0") . I have to work with a subprojects due to requirement need. I am facing the Spark dependencies with provided…
SkyOne
  • 188
  • 3
  • 15
1
vote
1 answer

error: not found: value jsDependencies value / is not a member of sbt.librarymanagement.ModuleID

I'm upgrading sbt-scalajs version from 0.6.x to 1.0.0. This is my old plugins.sbt config addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.33") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0") My new plugins.sbt…
user51
  • 8,843
  • 21
  • 79
  • 158
1
vote
0 answers

scalafix autofix plugin error "error: repeated argument not allowed here" when varargs are present in the codebase

I'm using varargs like below in my code base. def acceptVarargs[S](s: S*): Unit = {} def toVarArgs[T](s: Seq[T]) = acceptVarargs(s: _*) I'm using autofix plugin in my sbt project. I'm following the steps here to run the scalafix command. When I…
user51
  • 8,843
  • 21
  • 79
  • 158
1
vote
1 answer

sbt plugin: add an unmanaged jar file

I'm trying to create a relatively simple sbt plugin to wrap grpc-swagger artifact. Therefore, I've created a project with the following structure: projectDir/ build.sbt lib/grpc-swagger.jar <- the artifact I've downloaded src/... where…
Polentino
  • 907
  • 5
  • 16