Skip to content

Conversation

@arshinsikka
Copy link

This PR improves the VS Code tutorial for importing Gradle projects as discussed in issue #121.

Improvements:

  • ✅ Added context on Gradle support in VS Code
  • ✅ Clarified that Gradle is included in Java Extension Pack
  • ✅ Described typical Gradle project file structure
  • ✅ Added workspace trust prompt tip
  • ✅ Included gradle -version tip and JAVA_HOME guidance
  • ✅ Mentioned Gradle Tasks Panel usage
  • ✅ Added a concise troubleshooting section

These improvements follow suggestions by @damithc and @Johnwz123.
Closes #121

@arshinsikka
Copy link
Author

@damithc @Johnwz123 Thank you for your suggestions on improving the Gradle tutorial. I’ve incorporated the key points we discussed — including clarifications on Gradle support, workspace trust, project structure, JVM configuration, and troubleshooting tips.

Please let me know if there’s anything I may have missed or if further refinements are needed — I’d be happy to make additional improvements!

Copy link
Contributor

@damithc damithc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes suggested.


This guide will help you import and work with existing Gradle projects in VS Code.

💡 VS Code offers good Gradle support through extensions, though some manual steps may still be needed for a smooth experience.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arshinsikka Use icons from font-based icons supported by MarkBind, for a consistent look. The emojis you have used vary appearance based on the browser.

See https://markbind.org/userGuide/formattingContents.html#using-font-awesome-icons for more info. If using fontawesome icons, choose free ones only.

- `src/main/java`
- `src/test/java`


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not specific to VSCode. Hence, best given in https://se-education.org/guides/tutorials/gradle.html rather than here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue not addressed yet.

1. **Navigate to your existing Gradle project** folder
1. **Click "Select Folder"** to open it as a workspace

💡 When prompted, click "Yes" to trust the workspace so that Gradle tasks and extensions can run correctly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent with other tutorials, use back-ticks when referring to UI elements e.g., Yes instead of "Yes". This might require changes in other places of this page too.


<pic src="images/vscode/vscode_gradle_icon.jpg" width="400" />

## 🛠️ Troubleshooting
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the changes consistent with the rest of the page e.g., other headings don't use emojis

@arshinsikka
Copy link
Author

Hi @damithc,
Thanks for the helpful suggestions! I’ve made the requested changes:

  • Replaced emojis with Font Awesome icons or removed them where unnecessary
  • Updated section headings to avoid emoji usage (e.g., "Troubleshooting")
  • Used backticks for UI elements like Yes and Select Folder for consistency
  • Moved the generic Gradle setup tip into a proper tip box linking to the external tutorial
  • Ensured formatting aligns with other tutorials on the site

Please let me know if there’s anything else to adjust — happy to refine further! 😊



<box type="important" seamless>

### 🗂 Typical Gradle Project Structure
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not fully resolved yet e.g., this heading has an emoji

@arshinsikka
Copy link
Author

Hi Prof @damithc,
Thanks again for your feedback!

I've gone ahead and addressed the remaining items:

  • ✅ Removed all emojis (including Font Awesome ones) from headings for consistency
  • ✅ Used backticks for all UI labels like Yes and Select Folder
  • ✅ Finalized the contributors section with my name added

Please let me know if there’s anything else you'd like tweaked — happy to refine further!


Copy link
Contributor

@damithc damithc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments added.

## Importing an existing Gradle project

### Step 1: Open the project folder
### ### Step 1: Open the Project Folder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right.

- `src/main/java`
- `src/test/java`


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue not addressed yet.

@damithc
Copy link
Contributor

damithc commented Aug 10, 2025

@arshinsikka Waiting for you to fix the remaining issues

…section, fix heading, backtick UI labels, convert Gradle view note to info box, drop missing image, minor grammar
@arshinsikka
Copy link
Author

Hi Prof @damithc — thanks for the nudge! I’ve addressed the remaining items:

  • Removed the Typical Gradle Project Structure section (linked to the general Gradle tutorial instead, since it’s not VS Code–specific).
  • Fixed the heading typo (### ### Step 1### Step 1).
  • Standardized UI labels with backticks where relevant (e.g., Yes, Select Folder…, FileOpen Folder…).
  • Consolidated the Gradle view guidance into a small info box and linked to the official VS Code docs.
  • Removed the local image reference to avoid a broken asset.
  • Minor grammar/consistency touch‑ups.

Please let me know if you’d like any further tweaks — happy to adjust!

@damithc
Copy link
Contributor

damithc commented Sep 6, 2025

Sorry, it took a while to get to this PR. @arshinsikka it is not advisable for new contributors to send many PRs at once. Maintainers will prioritise other PRs because such multiple PRs from a new contributor means repetitive work e.g., asking to fix the same problem in multiple PRs. It is better to gradually increasing the PR count/size so that you can align your work with the standards of the repo first.

@damithc
Copy link
Contributor

damithc commented Sep 6, 2025

@Johnwz123 Any inputs on this?

Copy link
Contributor

@Johnwz123 Johnwz123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments.

This guide will help you import and work with existing Gradle projects in VS Code.

<box type="tip" seamless>
For general Gradle setup guidance, see <a href="https://se-education.org/guides/tutorials/gradle.html" target="_blank">our Gradle tutorial</a>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For general Gradle setup guidance, see <a href="https://se-education.org/guides/tutorials/gradle.html" target="_blank">our Gradle tutorial</a>.
For general Gradle setup guidance, see [our Gradle tutorial](https://se-education.org/guides/tutorials/gradle.html).

For consistency, I think we should stick to the Markdown way of formatting links rather than the HTML way.

1. **Check the status bar** at the bottom for any initialization messages

<box type="tip" seamless>
If your project uses Gradle, you should see a `build.gradle` or `build.gradle.kts` in the project root.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would make more sense to be under the "Prerequisites" section instead as a check for users to verify that the Java project is a Gradle project before proceeding with the rest of the tutorial. What do you think?

**Confirm you can access the Gradle tool window**. After the importing of the project is complete (which could take a few minutes), you will see the Gradle Tab in the VS Code interface (Look for the elephant icon on the left and click it).
<box type="info" seamless>
Open the **Gradle** view from the Activity Bar (elephant icon) to browse and run tasks.
See: <a href="https://code.visualstudio.com/docs/java/java-build#_gradle-support" target="_blank">VS Code: Java — Build with Gradle</a>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fragment identifier (#) for the link doesn't seem to exist when I tried? Also, I think it would be better to not wrap it in an "info" box since I think it is an important step to verify that the setup is successful.

If the Gradle icon doesn't appear after restarting VS Code, add `"gradle.nestedProjects": true` to your `settings.json` file.
</box>

<pic src="images/vscode/vscode_gradle_icon.jpg" width="400" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for removing the image?

Gradle support is included by default in the Java Extension Pack, so no separate Gradle installation is usually required.
</box>

<box type="important" seamless>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems out of place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improvements to "Importing a Gradle Project" VS Code tutorial

4 participants