ComputerScientist
174 subscribers
14 photos
3 files
206 links
▜ The Inventor

Stuff that inspire you to create.

See also: ▙ @LitMind
Download Telegram
8 steps to set-up a Java project in VS Code using Git, GitHub, and Gradle

This will help you set-up a Java project in VS Code that:
• Has source control using Git
• Has build automation with Gradle
• Benefits from a flexible development environment that is VS Code
• Is cross-platform and high-level yet, statically-typed and robust per Java
• Has collaborative possibilities through GitHub

But first, make sure you:
• Have Git, Gradle, Java, and VS Code installed, and in PATH
• Have the Git, Gradle and Java VS Code extensions installed and enabled
• Have a GitHub account

If you do, follow these steps:
1. Open the command prompt and use cd to navigate to anywhere you want
2. Use mkdir <project-name> to create a new directory, and cd <project-name> to navigate into it
3. Once inside, do gradle init and interact with it to initialize Gradle there
4. Do code . to open that directory in VS Code
5. Press Ctrl+Shift+G ⌨️, stage all changes, and commit your first commit
6. Create a new repo on GitHub, and copy the URL it gives you
7. Do git init to initialize the directory as a Git repo, git remote add origin <github-url> to set, and git remote -v to verify its remote origin [Source]
8. From within VS Code, click on sync on the bottom left corner

You are done!

#tutorial #java #vscode #gradle #github #git #cli #sourcecontrol #buildautomation