CodeAlpha_JavaGradleApp

CodeAlpha DevOps Internship — Task 3: Java Application using Gradle

A small Java to-do list CLI application, built and tested with Gradle, using Gson as a managed dependency, with an automated CI pipeline via GitHub Actions.

What it does

Project structure

CodeAlpha_JavaGradleApp/
├── build.gradle
├── settings.gradle
├── src/
│   ├── main/java/com/codealpha/app/
│   │   ├── App.java          # entry point
│   │   ├── Task.java         # data model
│   │   └── TaskManager.java  # business logic + Gson usage
│   └── test/java/com/codealpha/app/
│       └── TaskManagerTest.java
└── .github/workflows/gradle.yml

Prerequisites

This repo does not include the binary gradle-wrapper.jar (it must be generated locally once you have Gradle installed, since it’s a binary file). To generate it:

gradle wrapper --gradle-version 8.7

This creates gradlew, gradlew.bat, and gradle/wrapper/. Commit those so anyone can build the project with ./gradlew without installing Gradle themselves.

Build, test, run

# If you generated the wrapper:
./gradlew build
./gradlew test
./gradlew run

# Or with Gradle installed directly:
gradle build
gradle test
gradle run

Expected console output includes the task list, pending count, JSON export, and a confirmation that tasks.json was written.

Dependency management

build.gradle declares:

Run gradle dependencies to see the full resolved dependency tree.

CI/CD

.github/workflows/gradle.yml runs on every push/PR to main:

  1. Checks out the repo
  2. Sets up JDK 17
  3. Sets up Gradle
  4. Runs gradle build and gradle test
  5. Uploads the test report as a build artifact

Add a badge to the top of this README once the repo is on GitHub:

![Java CI](https://github.com/<your-username>/CodeAlpha_JavaGradleApp/actions/workflows/gradle.yml/badge.svg)

What this demonstrates (DevOps concepts)