Skip to content

[FEATURE]: sbt build system support for jib-container plugin #7236

@stefreak

Description

@stefreak

Feature Request

Background / Motivation

We'd like to support SBT build system for the jib-container plugin.

What should the user be able to do?

This example project should work, just like it does with Maven and Gradle:
https://github.com/garden-io/garden/tree/sbt-example-failing/examples/jib-container/helloworld-sbt

I would expect to be able to run garden build helloworld-sbt.

Installing SBT

  1. Install SDKMan https://sdkman.io/
  2. sdk install java 17.0.15
  3. sdk install sbt
    (See also https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Mac.html – the java version is hardcoded here, because sbt does not support the latest version of Java)

Why do they want to do this? What problem does it solve?

I can avoid the work-around involving building a fat jar and copying it to a Docker container manually. That's very slow and annoying.

For an example of the work-around, see here: https://github.com/garden-io/garden/tree/sbt-example-workaround/examples/jib-container/helloworld-sbt

Command to try the workaround: garden build sbt-build-container

Suggested Implementation(s)

Add sbt support to jib-container plugin, just like we support maven and gradle today.

How important is this feature for you/your team?

🥀 Crucial, Garden is unusable for us without it

🌵 Not having this feature makes using Garden painful

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions