0% found this document useful (0 votes)
2 views2 pages

DEVOPS Program3 Lab

This document outlines the steps to create a new Gradle project using the command line, specifying configurations such as Java version, project name, application structure, build script DSL, and test framework. It also provides commands for building, running, and testing the project. The selected options include using Groovy for the build script and JUnit 4 for testing.

Uploaded by

deepashet1304
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

DEVOPS Program3 Lab

This document outlines the steps to create a new Gradle project using the command line, specifying configurations such as Java version, project name, application structure, build script DSL, and test framework. It also provides commands for building, running, and testing the project. The selected options include using Groovy for the build script and JUnit 4 for testing.

Uploaded by

deepashet1304
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

DEVOPS (BCSL657D)

Program 3. Working with Gradle: Setting Up a Gradle


Project, Understanding Build Scripts (Groovy and
Kotlin DSL), Dependency Management and Task
Automation.
Create a new Gradle project:

Step 1: Create a new Gradle project using the command line:

gradle init --type java-application

 while creating project it will ask necessary requirement:


 Enter target Java version (min: 7, default: 21): 21
 Project name (default: program3-groovy): Prog3_groovyProject
 Select application structure:
 1: Single application project
 2: Application and library project
 Enter selection (default: Single application project) [1..2] 1
 Select build script DSL:
 1: Kotlin
 2: Groovy
 Enter selection (default: Kotlin) [1..2] 2
 Select test framework:
 1: JUnit 4
 2: TestNG
 3: Spock
 4: JUnit Jupiter
 Enter selection (default: JUnit Jupiter) [1..4] 1
 Generate build using new APIs and behavior (some features may
change in the next minor release)? (default: no) [yes, no]
 no

Step 2: Run Gradle Commands

 To build the project:


gradle build

 To run the project:

gradle run

 To test the project:

gradle test

You might also like