@@ -14,8 +14,8 @@ nix develop .#jdk17 # JDK 17
1414nix develop .# jdk21 # JDK 21
1515```
1616
17- This drops you into a shell with ` sbt ` , ` maven ` , ` gradle ` , ` bazelisk ` ,
18- ` nodejs ` , ` yarn ` , ` git ` , ` jq ` , etc. all pinned to the versions used in CI.
17+ This drops you into a shell with ` gradle ` , ` maven ` , ` bazelisk ` , ` nodejs ` ,
18+ ` yarn ` , ` git ` , ` jq ` , etc. all pinned to the versions used in CI.
1919
2020If you'd rather install tools manually, you'll need at least:
2121
@@ -43,25 +43,23 @@ These are the main components of the project.
4343 interface.
4444- ` scip-java/src/test ` : build-tool integration tests and fixtures for the
4545 ` scip-java ` command-line interface.
46- - ` build.sbt ` : the sbt build definition.
47- - ` project/plugins.sbt ` : plugins for the sbt build.
46+ - ` settings.gradle.kts ` : Gradle project layout.
47+ - ` build.gradle.kts ` : Gradle build definition.
48+ - ` gradle/libs.versions.toml ` : dependency and plugin versions.
4849
4950## Helpful commands
5051
51- | Command | Where | Description |
52- | ------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------- |
53- | ` sbt ` | terminal | Start interactive sbt shell with Java 11 (run from ` nix develop ` ). Takes a while to load on the first run. |
54- | ` unit/test ` | sbt | Run fast unit tests. |
55- | ` ~unit/test ` | sbt | Start watch mode to run tests on file save, good for local edit-and-test workflows. |
56- | ` cli/test ` | sbt | Run slow build tool tests (Gradle, Maven). |
57- | ` snapshots/testOnly tests.MinimizedSnapshotScipTest ` | sbt | Runs fast snapshot tests. Indexes a small set of files under ` tests/minimized ` . |
58- | ` snapshots/test ` | sbt | Runs all snapshot tests. |
59- | ` snapshots/run ` | sbt | Update only the Java snapshot goldens under ` tests/snapshots ` . |
60- | ` scipKotlincMinimized/kotlincSnapshots ` | sbt | Update only the Kotlin snapshot goldens under ` scip-kotlinc/minimized ` . |
61- | ` regenerateSnapshots ` | sbt | Regenerate ALL snapshot goldens (Java + Kotlin). Run after fixing a bug. |
62- | ` cli/run --cwd DIRECTORY ` | sbt | Run ` scip-java ` command-line tool against a given Gradle/Maven build. |
63- | ` google-java-format --replace $(git ls-files '*.java') ` | terminal | Format Java sources (from ` nix develop ` ). Enforced by ` nix flake check ` . |
64- | ` ktfmt --kotlinlang-style $(git ls-files '*.kt') ` | terminal | Format Kotlin sources (from ` nix develop ` ). Enforced by ` nix flake check ` . |
52+ | Command | Where | Description |
53+ | ------------------------------------------------------- | -------- | ----------------------------------------------------------------------- |
54+ | ` gradle test --no-daemon ` | terminal | Run all Gradle tests. |
55+ | ` gradle :scip-java:test --no-daemon ` | terminal | Run CLI build-tool integration tests (Gradle, Maven, SCIP config). |
56+ | ` gradle :scip-kotlinc:test --no-daemon ` | terminal | Run Kotlin compiler-plugin tests. |
57+ | ` gradle :scip-snapshots:test --no-daemon ` | terminal | Compare Java and Kotlin snapshot goldens. |
58+ | ` gradle :scip-snapshots:saveSnapshots --no-daemon ` | terminal | Regenerate Java and Kotlin snapshot goldens. |
59+ | ` gradle :scip-java:installDist --no-daemon ` | terminal | Build a local ` scip-java ` distribution under ` scip-java/build/install/ ` . |
60+ | ` gradle :scip-java:run --args='--cwd DIRECTORY' ` | terminal | Run ` scip-java ` against a given Gradle/Maven build. |
61+ | ` google-java-format --replace $(git ls-files '*.java') ` | terminal | Format Java sources (from ` nix develop ` ). Enforced by ` nix flake check ` . |
62+ | ` ktfmt --kotlinlang-style $(git ls-files '*.kt') ` | terminal | Format Kotlin sources (from ` nix develop ` ). Enforced by ` nix flake check ` . |
6563
6664## Import the project into IntelliJ
6765
@@ -80,20 +78,16 @@ Next, follow
8078[ these instructions] ( https://github.com/HPI-Information-Systems/Metanome/wiki/Installing-the-google-styleguide-settings-in-intellij-and-eclipse )
8179here to configure the Google Java formatter.
8280
83- Finally, run "File > Project From Existing Sources" to import the sbt build into
84- IntelliJ. Select the "sbt " option if it asks you to choose between
85- sbt/BSP/Bloop .
81+ Finally, run "File > Project From Existing Sources" to import the Gradle build
82+ into IntelliJ. Select the "Gradle " option if it asks you to choose a build
83+ model .
8684
87- It's best to run tests from the sbt shell , not from the IntelliJ UI.
85+ It's best to run tests from Gradle , not from the IntelliJ UI.
8886
8987## Tests are written in Java with JUnit 5
9088
91- The unit tests (` tests/unit ` ) and snapshot tests (` tests/snapshots ` ) are plain
92- Java using [ JUnit 5] ( https://junit.org/junit5/ ) , wired into sbt via
93- [ sbt-jupiter-interface] ( https://github.com/sbt/sbt-jupiter-interface ) . The
94- snapshot suite is a JUnit ` @TestFactory ` that emits one dynamic test per
95- generated document, comparing it against the committed goldens under
96- ` tests/snapshots/src/main/generated `
97- ([ snapshot testing] ( https://jestjs.io/docs/en/snapshot-testing ) is heavily used
98- in this codebase). Build-tool tests (` scip-java/src/test ` ) are written in
99- Kotlin.
89+ The Java tests use [ JUnit 5] ( https://junit.org/junit5/ ) through Gradle's JUnit
90+ Platform support. The snapshot suite is a JUnit ` @TestFactory ` that emits one
91+ dynamic test per generated document, comparing it against the committed goldens
92+ under ` scip-snapshots/expected ` . Build-tool tests (` scip-java/src/test ` ) are
93+ written in Kotlin.
0 commit comments