Skip to content

Instantly share code, notes, and snippets.

@dariahervieux
Last active March 3, 2021 13:16
Show Gist options
  • Save dariahervieux/f5f0b2823ad79a163de997f3a6ab478e to your computer and use it in GitHub Desktop.
Save dariahervieux/f5f0b2823ad79a163de997f3a6ab478e to your computer and use it in GitHub Desktop.
Gradle cheat-sheet

Generate a new project

You can use Build Init Plugin to generate a new Gradle build.

Generate a multi-module project

The java-application generates a new multi-module project with one submodule app. The henerated project has the following layout:

.
├── app
│   ...
│   └── build.gradle
└── settings.gradle

JUnit 4 is used as a default test framework. java-application type has a test-framework parameter to specify another framework to use:

For example to generate a new java project build with JUnit5 as a tes framework run within the project directory:

gradle init --type java-application --test-framework junit-jupiter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment