Dependencies
A project's dependencies are Maven coordinates listed under
dependencies:. By default each dep is on the project's
compile-and-runtime classpath. The four standard Maven configurations
(provided, optional, runtime, test) are available when you
need them, as a per-dep configuration: field — see
Maven configurations below.
What bleep doesn't have is the parallel-namespace axis that
Gradle (implementation { } / api { } / compileOnly { } /
runtimeOnly { }) and sbt (Compile / scalacOptions,
Test / fork, custom configurations like IntegrationTest) graft on
top. Dependencies live in one list. Different contexts — a
test code path with its own dependency tree, an integration suite
that needs Testcontainers but only on a tag — are different
projects.
The colon shorthands
| Form | When | Resolves as |
|---|---|---|
groupId:artifactId:version | Java or Kotlin libraries | slf4j-api-2.0.9.jar |
groupId::artifactId:version | Scala libraries (binary-version suffix) | fansi_3-0.5.0.jar (or _2.13, etc.) |
groupId:::artifactId:version | Scala libraries (full-version suffix — compiler plugins, scala-reflect macros) | paradise_3.8.3-2.1.1.jar |
projects:
myapp:
dependencies:
- org.slf4j:slf4j-api:2.0.9 # Java/Kotlin
- com.lihaoyi::fansi:0.5.0 # Scala
- org.scalamacros:::paradise:2.1.1 # Scala (full version)
For platform-specific resolution (Scala.js / Scala Native), bleep
picks the right artifact suffix from the project's platform.name
— you don't write _sjs1 or _native0.5 yourself.
Inter-project: dependsOn
To depend on another project in the same build:
projects:
app:
dependsOn: core # one
# or
dependsOn: [core, utils] # multiple
dependsOn: is the build graph. Bleep compiles core before app
when the dependency exists, and the
CI invalidation command walks this
graph to compute what needs rebuilding when source changes.
The long form
A bare string entry is shorthand. The full record exposes everything bleep stores about a dependency:
dependencies:
- module: org.scala-sbt::librarymanagement-core:1.7.1
configuration: provided
exclusions:
org.scala-sbt: util-logging_2.13
for3Use213: true
transitive: false
| Field | Applies to | Meaning |
|---|---|---|
module | both | The coordinate (the same string you'd put as the bare entry). |
configuration | both | Maven configuration: provided, optional, runtime, test. See below. |
exclusions | both | Map of org -> [moduleName] to drop from this dep's transitive closure. |
transitive | both | Default true. Set false to pin only the named artifact and ignore its dependencies. |
attributes | both | Extra Maven module attributes (rarely needed). |
publication | both | Override the resolved artifact's name / type / ext / classifier. |
isSbtPlugin | Java | Adds sbtVersion=1.0 and scalaVersion=2.12 attributes — needed when consuming an sbt plugin as a normal dependency. |
forceJvm | Scala | Pin the JVM artifact even on a JS or Native project. |
for3Use213 | Scala | When the project is on Scala 3, resolve the Scala 2.13 build. The standard escape hatch for libraries not yet published for 3. |
for213Use3 | Scala | The opposite. Rarely useful; binary compatibility usually doesn't carry that direction. |
Maven configurations
Most builds don't set configuration: — the default is the
compile-and-runtime classpath. The cases that matter:
provided— on the compile classpath but not the runtime classpath. Servlet APIs, etc.optional— same effect asprovidedfor downstream consumers; on this project's compile classpath but filtered out of inherited transitive resolution.runtime— the opposite ofprovided: present at runtime, not at compile time.test— only resolves when the project is a test project.
Worth calling out: when project A dependsOn: project B, deps that
B declared with configuration: provided (or optional) are
dropped from A's compile classpath, then re-added to A's
runtime classpath. You can model "provided at this layer, needed at
the leaf" without re-declaring the dep at every level.
What this page doesn't cover
- Conflict resolution (library version schemes, the eviction
model bleep inherits from sbt, the project-level
ignoreEvictionErrorskill switch, thebleep build evictedinspection) lives on its own page: Conflict resolution. - Updating dependencies
(
bleep build update-depsandbleep build update-dep) is in the Refactor your build guide. - BOM /
dependencyManagementis a known gap — every dependency declares its version explicitly. Spring Boot users feel this most. See Project status. - Custom configurations beyond the standard four, ivy resolvers other than Maven-style, custom artifact patterns: by design, these aren't modelled. The intricate ivyisms were dropped on purpose — what's left has a closed, hashable shape, which makes the build model cheap to cache (locally and in the remote build cache) and cheap to round-trip through the refactor commands.
See also
- Conflict resolution — the library-version-scheme machinery and the eviction-warning model.
- Refactor your build — commands that
edit dependencies in
bleep.yamlfor you. - Inspect the build — commands that read the build's dependency graph.
- Project status — the BOM gap and other known limitations.