Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Building and Testing a Java Application with Gradle and GitHub Actions

As part of my CodeAlpha DevOps Internship, I worked on a project that helped me understand how Java applications can be built, tested, and packaged using Gradle. Before this project, I had been working more with Docker, Terraform, and cloud deployment. This project gave me the opportunity to focus on the application build process and how CI/CD automation can help make it more reliable. The goal…

During my CodeAlpha DevOps internship, I explored how Java applications can be built, tested, and packaged using Gradle and GitHub Actions. The goal was to create a simple Java application, use Gradle for the build process, write unit tests, generate a JAR file, and automate the workflow with GitHub Actions. For this project, I used Java 21, Gradle 8.14.3, JUnit 5, and GitHub Actions.

I developed a CloudOps build monitor application, configured Gradle for Java 21 and necessary dependencies, wrote tests with JUnit 5, and generated an executable JAR. The GitHub Actions workflow ran locally and in the CI environment, building the application, running tests, and uploading the JAR as an artifact. This experience taught me the importance of build automation, how to use Gradle and JUnit, and the value of testing in a CI/CD pipeline.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

How floating-point numbers are stored (and why 0.1 isn't exact)

Disclosure: this post was written with AI assistance and checked by the FlashKit team. Open any console and type 0.1 + 0.2 . You get 0.30000000000000004 .

  • Floating-point numbers consist of sign bit, exponent, and mantissa
  • 0.1 cannot be stored exactly due to binary representation limitations
  • 0.1 + 0.2 ≠ 0.3 due to rounding errors in floating-point arithmetic

Audit the JSON-LD on your site with Python

JSON-LD, in this context, is the block of structured data inside a <script type="application/ld+json"> tag that tells search engines what a page describes: a product, an event, an organisation.

  • JSON-LD provides structured data for web pages to search engines
  • Validators check JSON-LD for individual URLs, but script audits all pages
  • Script identifies common issues like invalid JSON types and past event dates

How to Configure CSP Headers: The Web Security Header That Actually Catches Things

$32 $33 Why Developers Care Three reasons to actually deploy CSP: It catches real bugs. I've had CSP reports reveal XSS vulnerabilities that I'd missed - places where user input was being rendered…

  • Deploy Content Security Policy (CSP) to catch genuine bugs and meet compliance requirements.
  • Strict CSP makes buggy sites harder to exploit compared to buggy sites without CSP.
  • Use CSP Evaluator extension to flag weaknesses in your policy during iteration.

More from Friday 27 November →