Running gradle as daemon (Mac)

How to know if gradle daemon is running or not ? Run "gradle --stop" on commandline. It should spit out that gradle is not running as daemon.
$ gradle --stop
No Gradle daemons are running.

Follow these steps to make gradle run as daemon:

Navigate to /Users/<your user name>/.gradle
cd /Users/<your user name>/.gradle
Create a file name gradle.properties
vi gradle.properties
Add a line in "gradle.properties"
org.gradle.daemon=true

Done !

Note: Execute any gradle task to kick start daemon.

Verify
$ gradle --stop
Stopping daemon(s).
Gradle daemon stopped.


 
 

Adding JAVA_HOME env variable to bash (Mac)

On your terminal, execute this command all together:
echo "# Java environment variables
export JAVA_HOME=$(/usr/libexec/java_home)
export JDK_HOME=$(/usr/libexec/java_home)
" >> ~/.bash_profile&&\
source ~/.bash_profile

Installing gradle using commandline (Mac)

Simple ! Just execute this command on your terminal :

brew install gradle

Pre-req: you should have Homebrew for Mac already installed. 

Installing gradle on Mac (using gradle wrapper)

The simplest way to install gradle from commandline is to simply execute this script that comes with gradle wrapper.

All you have to do is to execute this command on terminal:
./gradlew
Output:

Downloading https://services.gradle.org/distributions/gradle-2.3-bin.zip
...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /Users/PTyagi/.gradle/wrapper/dists/gradle-2.3-bin/a48v6zq5mdp1uyn9rwlj56945/gradle-2.3-bin.zip to /Users/PTyagi/.gradle/wrapper/dists/gradle-2.3-bin/a48v6zq5mdp1uyn9rwlj56945
Set executable permissions for: /Users/PTyagi/.gradle/wrapper/dists/gradle-2.3-bin/a48v6zq5mdp1uyn9rwlj56945/gradle-2.3/bin/gradle 

Keep trying out ideas !

This is not a technical post, but worth giving a though into !

The best way to invent something Great in life, is to keep trying out Silly ideas :)

"And yet the best way to have a good idea is to have as many bad ones as you can. The best way to write good poetry is to write a whole lot of stuff, and find the diamonds in the rough. The best way to set goals is to set 45 of them and see which ones stick around that are really the most interesting to us. And the best way to keep loving people we love is to keep the air clear with honest feedback." ~ David Allen

Scheduling Repeating Local Notifications using Alarm Manager

Learn about Scheduling Repeating Local Notifications using Alarm Manager in this post .