Lab Project File Guide
What every file and folder in a lab does — and why it's there
When you clone a lab, you get a folder full of files you didn’t write. This page explains every one of them. You don’t need to memorize this — bookmark it and come back when something looks unfamiliar.
The Full Picture
A typical lab looks like this after cloning:
lab-03-user-input/
├── .devcontainer/
│ └── devcontainer.json
├── .gitattributes
├── .gitignore
├── .vscode/
│ ├── extensions.json
│ ├── launch.json
│ └── settings.json
├── app/
│ ├── build.gradle.kts
│ └── src/
│ ├── main/java/lab/input/
│ │ └── App.java ← you write this
│ └── test/java/lab/input/
│ ├── AppTest.java ← the tests
│ └── support/
│ └── LabTestKit.java
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── README.md
└── settings.gradle.kts
What you write
app/src/main/java/lab/input/App.java
This is your file. The package name changes per lab (lab.input, lab.stats, etc.),
but App.java is always where you write your solution.
The starter has an empty main() and sometimes a few stub methods with TODO comments.
Everything else is scaffolding so the tests can run.
README.md
What: The lab specification. Everything you need to build is described here.
Why we care: It’s the contract between you and the autograder. If the README says
“output contains ‘43’”, then your output needs to contain 43. No more, no less.
Open it in VS Code — it renders as formatted HTML (headings, code blocks, tables).
The .vscode/ folder
VS Code workspace settings. These three files configure the editor for this lab specifically, independent of your personal VS Code settings.
.vscode/settings.json
Workspace-level editor preferences. When you open this folder in VS Code, these take effect automatically:
| Setting | Value | Why |
|---|---|---|
editor.formatOnSave |
true |
Code is auto-formatted every time you save |
editor.tabSize |
4 |
Java convention: 4-space indent |
github.copilot.enable |
{"*": false} |
Copilot is off for this workspace |
editor.defaultFormatter |
redhat.java |
Uses the official Red Hat Java formatter |
*.md association |
vscode.markdown.preview.editor |
README opens as rendered HTML |
editor.wordWrapColumn |
100 |
Lines wrap at 100 characters |
Workspace settings override your personal settings for files in this folder. If you have Copilot turned on globally, it will still be off here.
See VS Code Settings Guide for more.
.vscode/extensions.json
A list of recommended extensions. When you open the folder, VS Code shows a popup asking if you want to install them. You can also find them under Extensions → “Workspace Recommendations”.
Current recommendations:
- vscjava.vscode-java-pack — Java syntax, IntelliSense, debugger, and test runner
- sandcastle.vscode-open — Adds an “Open in Browser” button for HTML files
- yzhang.markdown-all-in-one — Keyboard shortcuts and better rendering for
.mdfiles - streetsidesoftware.code-spell-checker — Spell-check in comments and strings
Extensions listed under unwantedRecommendations (Copilot, Gemini, GitLens) will
not show up as suggestions in this workspace.
.vscode/launch.json
Configures the Run and Debug panel. It tells VS Code which class to launch when you click the green play button or press F5.
You shouldn’t need to change this. If Run App disappears from the debug panel,
it means VS Code didn’t detect your Java runtime — run ./gradlew build first.
The app/ folder
This is a Gradle subproject. In CSCD 210, every lab has exactly one subproject
called app.
app/build.gradle.kts
The build configuration file. It declares:
- Which Java version to use
- Which test framework to use (JUnit 5)
- Which class contains
main()(so./gradlew runworks)
You won’t need to edit this. If you want to know what a setting does, open it and read the comments.
app/src/test/java/lab/input/AppTest.java
The automated test suite. It runs when you call ./gradlew test.
Each test has a @Tag("cpN") annotation that maps to a checkpoint:
cp1→ 1 point → checkpoint 1cp2→ 1 point → checkpoint 2- … and so on
If a test fails, the error message tells you what was expected, what went wrong, and how to fix it. Read the full output — it’s designed to be useful.
app/src/test/java/lab/input/support/LabTestKit.java
Shared test utilities. You don’t write this or call it directly. It’s the code
that AppTest.java uses to run your program, inspect your source code, and
format error messages.
You can read it if you’re curious about how tests work — it’s plain Java.
Gradle files
Gradle is the build tool. It compiles your code, runs tests, and manages dependencies.
gradlew and gradlew.bat
The Gradle wrapper scripts. gradlew is for Linux/macOS; gradlew.bat is for Windows.
These scripts download and run a specific version of Gradle — you don’t need Gradle installed globally. This ensures everyone on every machine runs the same build.
Common commands:
./gradlew build # compile + test
./gradlew test # run tests only
./gradlew run # run App.java
./gradlew testCheckpoint3 # run only cp3
gradle/wrapper/gradle-wrapper.jar
A tiny Java program that downloads the correct Gradle version. You never run it
directly — ./gradlew calls it for you.
gradle/wrapper/gradle-wrapper.properties
Specifies which Gradle version to download. Don’t change this.
gradle.properties
JVM settings passed to every Gradle build:
org.gradle.jvmargs=-Xmx512m # max 512 MB RAM (safe on 4 GB machines)
org.gradle.daemon=false # no background process
org.gradle.workers.max=2 # 2 parallel workers max
These settings are conservative so Gradle works on Chromebooks and older laptops.
settings.gradle.kts
Declares the project name and which subprojects exist (include("app")).
You won’t touch this.
.gitattributes
Tells Git how to handle line endings per file type.
| Rule | Why |
|---|---|
gradlew text eol=lf |
Shell scripts must use Unix line endings or they break on Linux |
*.bat text eol=crlf |
Windows batch files must use Windows line endings |
*.java text |
Git normalizes Java files to LF on checkout |
Without this, cloning on Windows then pushing can corrupt gradlew and break CI.
Don’t delete this file.
.gitignore
Tells Git which files to skip. Key rules:
| Pattern | What it ignores |
|---|---|
.gradle/ |
Gradle’s download cache |
build/ |
Compiled output (regenerated on every build) |
.idea/ |
IntelliJ project files |
*.class |
Compiled Java bytecode |
Note: .vscode/ is not in .gitignore. That’s intentional — the .vscode/
folder belongs in Git so everyone gets the same editor settings.
.devcontainer/devcontainer.json
Configures a containerized development environment for GitHub Codespaces or the VS Code Dev Containers extension.
If you’re working locally, ignore this file entirely — it doesn’t affect anything.
If you open the repo in Codespaces (cloud browser-based VS Code), this file automatically installs Java, Gradle, and the right VS Code extensions in a container. No local installation needed.
Quick reference
| File | Edit it? | What it does |
|---|---|---|
App.java |
Yes — your work | Your solution |
AppTest.java |
No | Automated tests |
LabTestKit.java |
No | Test utilities |
build.gradle.kts |
No | Build config |
settings.gradle.kts |
No | Project name |
gradle.properties |
No | JVM memory settings |
gradlew / gradlew.bat |
No | Build wrapper scripts |
gradle-wrapper.jar |
No | Downloads Gradle |
.vscode/settings.json |
No | Editor settings |
.vscode/extensions.json |
No | Extension recommendations |
.vscode/launch.json |
No | Run/debug config |
.gitattributes |
No | Line-ending rules |
.gitignore |
No | What Git skips |
.devcontainer/ |
No | Codespaces config |
README.md |
No | Lab specification |