LinuxCommandLibrary

gradle-init

Gradle project scaffolding generator

TLDR

Create new project interactively

$ gradle init
copy
Create Java application
$ gradle init --type java-application
copy
Create with Kotlin DSL
$ gradle init --type java-application --dsl kotlin
copy
Create library with test framework
$ gradle init --type java-library --test-framework junit-jupiter
copy
Create Kotlin application
$ gradle init --type kotlin-application
copy
Create basic empty project
$ gradle init --type basic
copy

SYNOPSIS

gradle init [--type type] [--dsl dsl] [options]

DESCRIPTION

gradle init creates a new Gradle project with a standard directory structure. It can run interactively, prompting for project type, language, and build script DSL, or non-interactively with command-line options. Supported types include applications and libraries for Java, Kotlin, Groovy, Scala, C++, and Swift.

PARAMETERS

--type type

Project type: java-application, java-library, kotlin-application, etc.
--dsl dsl
Build script DSL: groovy or kotlin.
--test-framework framework
Test framework: junit, junit-jupiter, spock, testng.
--project-name name
Project name.
--package package
Source package name.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community