Gradle Commands Cheat Sheet

Posted on  by 



Gradle Cheatsheet. GitHub Gist: instantly share code, notes, and snippets. PowerShell is a task based command line shell and scripting language. To run it, click Start, type PowerShell, run PowerShell ISE or PowerShell as Administrator. Commands are written in verb -noun form, and named parameters start with a dash. The Brew Cheatsheet commands can be downloaded from the link below. The PDF document contains a list of the brew commands that are frequently used. This cheatsheet document is not intended as a complete documented list of all commands and for that you should rather visit the official brew documentation page. The following sections describe use of the Gradle command-line interface, grouped roughly by user goal. Some plugins also add their own command line options, for example -tests for Java test filtering. For more information on exposing command line options for your own tasks, see Declaring and using command-line options.

Try to summarize some common command for gradle:

Run a specific test case

Run a specific class

Basically you can use JavaExec task to achieve this, for example, you can add an execute task in your build.gradle file:

To run a sepcific class,

Note: mainClass is the name of class you want to run and passed in at command line.

Command

Generate the default folder structure

show dependencies for your gradle project

or if you want to show the dependencies for all of your sub-projects, add the following into your top level build.gradle

Lock dependencies

You can use dynamic dependency versions and still lock them to specific versions with the Gradle Dependency Lock Plugin](https://plugins.gradle.org/plugin/nebula.dependency-lock) from Netflix’s Nebula Plugins project.

Use artifact from a local project

Gradle commands cheat sheet pdf

Sometimes you might want to use an artifact from a local project where you may have some local changes that haven’t been pushed to the artifactory yet. Suppose you have two project (A, B), and you want to use a local build from project B in project A.

To do so, you need to:

Gradle

In both project

Make sure you have maven plugin added, and also have mavenLocal First post!emv software. in your repository setting.

Note, if you have sub-projects for each project, make sure the above is applied to all sub-projects.

In Project B

Use gradle publishToMavenLocal to publish the build artifact to your local maven repository. Once it’s done, you should be able to find the build artifact in your local maven repository ${user.home}/.m2/reposistories.NOTE this requires the maven-publish plugin to be added to the projects.

Gradle commands cheat sheet pdf

exclude test and/or check

Configure jvm args in gradle.properties

This will configure the jvm args for build tools.

For client VMs, you need to use JVM_OPTS

For more information, check this out: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html

disable gradle daemon

Enable logging output for gradle tests

Define a gradle task that runs a command

see details here TestLoggingContainer

Pass custom properties to task

Then the property customProp can be passed in cli as:

  • Documentation Browser for Software Developers
  • Git and GitHub Cheat Sheets
  • Linux Command Cheat Sheets
  • OpenShift Cheat Sheets

Cheat Sheets¶

  • wizardzines.com 🌟 programming zines by Julia Evans
  • Red Hat Developer cheat sheets 🌟 Browse through our collection of cheat sheets to help you develop with Red Hat products, which you can download for free as a Red Hat Developer member. You’ll find handy guides on a range of the latest developer tools and technologies, including Kubernetes, microservices, containers, and more.

AWS Cheat Sheets¶

API Cheatsheets¶

eBooks¶

Gradle Execute Command

  • Red Hat Developer eBooks 🌟 Browse through our collection of eBooks to help you develop with Red Hat products, which you can download for free as a Red Hat Developer member. You’ll find handy books on a range of the latest developer tools and technologies, including Kubernetes, microservices, containers, and more.
  • Transformation takes practice Our experts understand this: When it comes to your unique business challenges, one size does not fit all. We can guide you through exercises and tools, like the ones within the Open Practice Library, that are right for where you are, right now.

Documentation Browser for Software Developers¶

Dash for MacOS (paid)¶

  • Dash for MacOS Dash gives your Mac instant offline access to 200+ API documentation sets.

Velocity (Windows, paid)¶

  • Velocity Velocity gives your Windows desktop offline access to over 150 API documentation sets

Zeal (Windows, Linux, Free)¶

  • Zeal Zeal is an offline documentation browser for software developers.

Gradle Commands Cheat Sheet Fortnite

Kubernetes Knowledge Hubs and Glossary¶

  • k8sref.io 🌟 Kubernetes Reference
  • Kubernetes Research. Research documents on node instance types, managed services, ingress controllers, CNIs, etc. 🌟 A research hub to collect all knowledge around Kubernetes. Those are in-depth reports and comparisons designed to drive your decisions. Should you use GKE, AKS, EKS? How many nodes? What instance type?
  • Kubernetes Reference: dev-k8sref-io.web.app 🌟 Imports paths are not always easy to find for a resource. Get some help from this doc.

Kubectl Cheat Sheets¶

  • opensource.com: 9 kubectl commands sysadmins need to know 🌟 Keep these 9 critical kubectl commands handy to help you with troubleshooting and managing your Kubernetes cluster administration.
  • medium: Awesome Kubernetes Command-Line Hacks Tips for you to kubectl like a pro
  • github: K8s in 30 mins 🌟 This is not a comprehensive guide to learn Kubernetes from scratch, rather this is just a small guide/cheat sheet to quickly setup and run applications with Kubernetes and deploy a very simple application on single workload VM. This repo can be served as quick learning manual to understand Kubernetes.
  • kunchalavikram1427: kubernetes Public
  • betterprogramming.pub: Awesome Kubernetes Command-Line Hacks Tips for you to kubectl like a pro

Docker Cheat Sheets¶

Git and GitHub Cheat Sheets¶

  • rogerdudler.github.io: git - the simple guide 🌟 Just a simple guide for getting started with git. no deep shit ;)

Git Flow Cheat Sheets¶

Sourcetree Cheat Sheet¶

GitKraken Git Cheat¶

Ansible Cheat Sheets¶

  • Ansible k8s cheat sheet 🌟 The Ansible k8s module enables you to manage Kubernetes objects with Ansible playbooks.

Packer and Terraform Cheat Sheets¶

Linux Command Cheat Sheets¶

SSH Cheat Sheets¶

OpenShift Cheat Sheets¶

Debezium Cheat Sheets¶

  • developers.redhat.com: Debezium on OpenShift Cheat Sheet Debezium is a distributed open-source platform for change data capture. Start it up, point it at your databases, and your apps can start responding to all of the inserts, updates, and deletes that other apps commit to your databases. Debezium is durable and fast, so your apps can respond quickly and never miss an event, even when things go wrong. This cheat sheet covers how to deploy/create/run/update a Debezium Connector on OpenShift.

Kubernetes Operator Cheat Sheets¶

Kubernetes POD Cheat Sheets¶

Buildah Cheat Sheets¶

Helm Cheat Sheets¶

Maven Cheat Sheets¶

Gradle Cheat Sheets¶

Eclipse MicroProfile¶

Jenkins Cheat Sheets¶

  • edureka.co: Jenkins Cheat Sheet 🌟

JMeter Cheat Sheets¶

  • Groovy Templates Cheat Sheet for JMeter Need help with your Groovy templates? Check out this cheat sheet to help you get started with scripting in Apache JMeter.
  • martkos-it.co.uk: JMeter Cheat Sheet This jmeter cheat sheet provides gentle reminders of the usage of jmeter gui/non-gui. It includes installation/execution, plugins, shortcut keys and functions and variables.

Quarkus Cheat Sheets¶

Markdown Cheat Sheets¶

  • markdownguide.org

Machine Learning¶

TypeScript¶

Jupyter¶

Postgres¶

MariaDB and mySQL¶

MongoDB¶

Go¶

NodeJS¶





Coments are closed