Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,27 @@ Add the plugin dependency to the file `project/plugins.sbt` using `addSbtPlugin`
`addSbtPlugin("com.github.sbt" %% "sbt-sbom" % "0.5.0")`

Note that the minimum supported version of sbt is 1.6.0 (this is what the [scripted](https://www.scala-sbt.org/1.x/docs/Testing-sbt-plugins.html#scripted+test+framework) tests target)

### enable plugin

To enable the plugin, add `enablePlugins(SbomPlugin)` to your `build.sbt` file:

#### single module project

```scala
enablePlugins(SbomPlugin)
```

#### multi module project

```scala
lazy val someModule = (project in file("some-module"))
.settings(
name := "myArtifact",
version := "1.0",
)
.enablePlugins(SbomPlugin)
```

### BOM creation

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/github/sbt/sbom/BomSbtPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ object BomSbtPlugin extends AutoPlugin {

override def requires: Plugins = JvmPlugin

override def trigger: PluginTrigger = allRequirements
override def trigger: PluginTrigger = NoTrigger

object autoImport {
lazy val bomFileName: SettingKey[String] = settingKey[String]("bom file name")
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/bomfile/bomname/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

lazy val root = (project in file("."))
.enablePlugins(BomSbtPlugin)
.settings(
name := "dependencies",
version := "0.1",
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/bomfile/exists/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

lazy val root = (project in file("."))
.enablePlugins(BomSbtPlugin)
.settings(
name := "exists",
version := "0.1",
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/dependencies/compile/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

lazy val root = (project in file("."))
.enablePlugins(BomSbtPlugin)
.settings(
name := "dependencies",
version := "0.1",
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/dependencies/compileNoTree/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

lazy val root = (project in file("."))
.enablePlugins(BomSbtPlugin)
.settings(
name := "dependencies",
version := "0.1",
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/dependencies/integrationTest/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

lazy val root = (project in file("."))
.enablePlugins(BomSbtPlugin)
.settings(
name := "dependencies",
version := "0.1",
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/dependencies/test/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

lazy val root = (project in file("."))
.enablePlugins(BomSbtPlugin)
.settings(
name := "dependencies",
version := "0.1",
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/dependenciesJson/compile/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

lazy val root = (project in file("."))
.enablePlugins(BomSbtPlugin)
.settings(
name := "dependencies",
organization := "organization",
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/dependenciesJson/compileNoTree/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

lazy val root = (project in file("."))
.enablePlugins(BomSbtPlugin)
.settings(
name := "dependencies",
version := "0.1",
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/dependenciesJson/integrationTest/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

lazy val root = (project in file("."))
.enablePlugins(BomSbtPlugin)
.settings(
name := "dependencies",
version := "0.1",
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/dependenciesJson/test/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

lazy val root = (project in file("."))
.enablePlugins(BomSbtPlugin)
.settings(
name := "dependencies",
version := "0.1",
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/schemaVersion/unsupported/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sbt.Keys._

lazy val root = (project in file("."))
.enablePlugins(BomSbtPlugin)
.settings(
name := "dependencies",
version := "0.1",
Expand Down
Loading