command line options for gradle
satya - 8/1/2018, 8:00:54 AM
Useful commands
//version
gradle -v
//initialize a dir for gradle builds
gradle init
//See what tasks are available
gradle tasks
satya - 8/1/2018, 8:08:46 AM
Just like init, boot strapping for other types of builds is important. here is a link
Just like init, boot strapping for other types of builds is important. here is a link
satya - 8/1/2018, 8:10:03 AM
The init (task) sets up build directory structure
The init (task) sets up build directory structure
satya - 8/1/2018, 8:13:07 AM
To create a directory for java builds
gradle init --type java-library
gradle init --type java-application
satya - 8/1/2018, 8:13:28 AM
The list of available build types are documented here
satya - 8/1/2018, 8:15:44 AM
Gradle options long form (--) and short form (-)
-v is same as --version
-q is same as --quite
satya - 8/1/2018, 8:16:01 AM
To know all the options type
gradle -h
//or
gradle --help
satya - 3/18/2019, 1:54:23 PM
What is the gradle daemon?
What is the gradle daemon?
satya - 3/18/2019, 1:55:04 PM
When you try to build with gradle it starts a daemon program
When you try to build with gradle it starts a daemon program
satya - 3/18/2019, 1:55:57 PM
Here is why the daemon...
Gradle runs on the Java Virtual Machine (JVM) and uses several supporting libraries that require a non-trivial initialization time. As a result, it can sometimes seem a little slow to start. The solution to this problem is the Gradle Daemon: a long-lived background process that executes your builds much more quickly than would otherwise be the case. We accomplish this by avoiding the expensive bootstrapping process as well as leveraging caching, by keeping data about your project in memory. Running Gradle builds with the Daemon is no different than without. Simply configure whether you want to use it or not - everything else is handled transparently by Gradle.
satya - 3/18/2019, 1:57:26 PM
The gradle global properties file is here
install-dir/.gradle/gradle.properties
satya - 3/18/2019, 1:57:49 PM
You can disable the daemon this way
org.gradle.daemon=false
satya - 3/18/2019, 1:58:32 PM
You can stop it
gradle --stop
satya - 3/18/2019, 1:59:57 PM
In Eclipse...
The Gradle Tooling API that is used by IDEs and other tools to integrate with Gradle always uses the Gradle Daemon to execute builds. If you are executing Gradle builds from within your IDE you are using the Gradle Daemon and do not need to enable it for your environment.
satya - 3/18/2019, 2:02:15 PM
It is primarily used for programatical control of the gradle builds, as in IDEs.
It is primarily used for programatical control of the gradle builds, as in IDEs.