Giter VIP home page Giter VIP logo

tp's Introduction

Project Template for the tP

This is a project template for a small CLI Java project. It uses Gradle for build automation and GitHub Actions for CI.

Setting up in Intellij

Prerequisites: JDK 11, update Intellij to the most recent version

  1. Open Intellij (if you are not in the welcome screen, click File > Close Project to close the existing project dialog first)
  2. Set up the correct JDK version
    1. Click Configure > Structure for New Projects and then Project Settings > Project > Project SDK
    2. If JDK 11 is listed in the drop down, select it. If it is not, click New... and select the directory where you installed JDK 11
    3. Click OK
  3. Click Import Project
  4. Locate the build.gradle file in the project directory, select it, and click OK
  5. If there are any further prompts, accept the defaults.
  6. After the set up is complete, you can locate the src/main/java/seedu/duke/Duke.java file, right-click it, and choose Run Duke.main(). If the setup is correct, you should see something like the below:
    > Task :compileJava
    > Task :processResources NO-SOURCE
    > Task :classes
    
    > Task :Duke.main()
    Hello from
     ____        _        
    |  _ \ _   _| | _____ 
    | | | | | | | |/ / _ \
    | |_| | |_| |   <  __/
    |____/ \__,_|_|\_\___|
    
    What is your name?
    
    Type some word and press enter to let the execution proceed to the end. Also note how Intellij is now using Gradle to run your code (you can make Intellij run the code without Gradle this way).

Build Automation using Gradle

This project is already configured to use Gradle. Read the following tutorial to learn how to use gradle to do tasks such as running tests, checking code against teh style rules, and generating the JAR file.

Testing

To run I/O redirection tests (aka Text UI tests), navigate to the text-ui-test and run the runtest(.bat/.sh) script.

To run JUnit tests (after you have added JUnit tests), you can run the test Gradle task.

CI using GitHub Actions

The project is already configured to use GitHub actions. When you push a commit to your fork or PR against an upstream repo, GitHub actions will run automatically to build and verify the product.

tp's People

Contributors

zhilin-huang avatar g-lilian avatar sliu107 avatar quinnyyy avatar j-lum avatar damithc avatar jiachen247 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.