Reoder sections.
========
Gradle
========
.. contents::
:local:
Getting help
============
::
$ gradle --help
Getting list of subprojects
===========================
::
$ gradle projects
Getting list of supported tasks
===============================
::
$ gradle tasks
Getting list of supported tasks in each subproject::
$ gradle tasks --all
Getting help on task::
$ gradle -q help --task build
Similar but to each task::
$ gradle model
Build sources
=============
::
$ gradle compileJava
$ gradle compileTestJava
Run main class
==============
::
$ gradle run
Run tests
=========
::
$ gradle test
To run tests with additional registered checks::
$ gradle check
.. note::
``--rerun-tasks`` option *specifies that any task optimization is ignored*.
In that way you may rerun tests even if there are no changed files::
$ gradle test --rerun-tasks
Stopping server
===============
::
$ gradle --stop
List project dependencies
=========================
List of project execution dependencies (it also download dependencies)::
$ gradle dependencies
$ gradle dependencies --configuration compile
$ gradle dependencies -p $SUBPROJ
$ gradle :$SUBPROJ:dependencies
$ gradle :$SUBPROJ:dependencies --configuration testCompile
List of project plugin dependencies::
$ gradle buildEnvironment
$ gradle buildEnvironment -p $SUBPROJ
$ gradle :$SUBPROJ:buildEnvironment
Paths to dependencies can be printed via task::
task printDepPaths {
doLast { configurations.runtime.each { println it } }
}
All dependencies can be copied to single directory via task::
task copyRuntimeLibs(type: Copy) {
into "lib"
from configurations.runtime
// from configurations.testRuntime - configurations.runtime
}
List project properties
=======================
::
$ gradle properties
$ gradle :$SUBPROJ:properties
$ gradle properties -p $SUBPROJ
Dry tun
=======
``-m`` option allow parsing build scripts without actually executing them::
$ gradle -m clean compile