Skip to content

Commit d290302

Browse files
Freshen up dev docs
1 parent b66a423 commit d290302

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

docs/contributing.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ This page documents tips and tricks for contributing to the
99

1010
## System dependencies
1111

12-
- `java`: any version should work
12+
- [`sbt`](https://www.scala-sbt.org/): `brew install sbt` or see [sbt installation guide](https://www.scala-sbt.org/download/)
13+
- `java`: Java 11 is recommended
14+
- If you start sbt using the provided `./sbt` script, it will automatically use the correct version of Java
1315
- `git`: any version should work
1416
- `gradle`: `brew install gradle`, or see
1517
[general installation guide](https://gradle.org/install/).
1618
- `mvn`: `brew install maven`, or see
1719
[general installation guide](https://www.baeldung.com/install-maven-on-windows-linux-mac).
20+
- _optional_ `coursier`: `brew install coursier/formulas/coursier`, or see
21+
[general installation guide](https://get-coursier.io/docs/cli-installation.html).
1822

1923
## Project structure
2024

@@ -32,13 +36,26 @@ These are the main components of the project.
3236
- `cli/src/main/scala`: implementation of the `scip-java` command-line
3337
interface.
3438
- `build.sbt`: the sbt build definition.
35-
- `project/plugins.sbt`: plugins for the sbt build.
39+
- `semanticdb-gradle-plugin/src/main/scala`: Gradle plugin for auto-indexing
40+
- `semanticdb-maven-plugin/src/main/java`: Maven plugin for auto-indexing
41+
- `semanticdb-agent`: [Java agent](https://www.baeldung.com/java-instrumentation) for auto-indexing – it's used as a fallback mechanism for when injecting code into the build failed
42+
- `examples`: Bazel and Maven sample projects, used for demonstration and are validated on CI
43+
- `project/plugins.sbt`: plugins for the sbt build ([sbt is recursive](https://www.scala-sbt.org/1.x/docs/Organizing-Build.html#sbt+is+recursive))
44+
45+
## Development guidelines
46+
47+
The main build tool used by this project is sbt. The most important aspect worth knowing about sbt is that it's a REPL – start it once, and issue the [commands](#helpful-commands) in the REPL.
48+
It should not be used as a CLI tool (e.g. running `sbt test` every time), as it takes quite a bit of time to start up.
49+
50+
For basics of working with sbt, see [sbt by example](https://www.scala-sbt.org/1.x/docs/sbt-by-example.html)
3651

3752
## Helpful commands
3853

3954
| Command | Where | Description |
4055
| ------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------- |
4156
| `./sbt` | terminal | Start interactive sbt shell with Java 11. Takes a while to load on the first run. |
57+
| `projects` | sbt | List all projects in the build |
58+
| `show cli/pack` | sbt | Run fast unit tests. |
4259
| `unit/test` | sbt | Run fast unit tests. |
4360
| `~unit/test` | sbt | Start watch mode to run tests on file save, good for local edit-and-test workflows. |
4461
| `buildTools/test` | sbt | Run slow build tool tests (Gradle, Maven). |
@@ -47,7 +64,7 @@ These are the main components of the project.
4764
| `snapshots/testOnly tests.LibrarySnapshotSuite` | sbt | Runs slow snapshot tests. Indexes a corpus of external Java libraries. |
4865
| `snapshots/test` | sbt | Runs all snapshot tests. |
4966
| `snapshots/run` | sbt | Update snapshot tests. Use this command after you have fixed a bug. |
50-
| `cli/run --cwd DIRECTORY` | sbt | Run `scip-java` command-line tool against a given Gradle/Maven build. |
67+
| `cli/run --cwd DIRECTORY` | sbt | Run `scip-java` command-line tool against a given folder with any supported build tool. |
5168
| `cd website && yarn install && yarn start` | terminal | Start live-reload preview of the website at http://localhost:3000/scip-java. |
5269
| `docs/mdoc --watch` | sbt | Re-generate markdown files in the `docs/` directory. |
5370
| `fixAll` | sbt | Run Scalafmt, Scalafix and Javafmt on all sources. Run this before opening a PR. |

0 commit comments

Comments
 (0)