How to use exec() output in gradle

This is my preferred syntax for getting the stdout from exec: def stdout = new ByteArrayOutputStream() exec{ commandLine “whoami” standardOutput = stdout; } println “Output:\n$stdout”; Found here: http://gradle.1045684.n5.nabble.com/external-process-execution-td1431883.html (Note that page has a typo though and mentions ByteArrayInputStream instead of ByteArrayOutputStream)

How to download dependencies in gradle

Downloading java dependencies is possible, if you actually really need to download them into a folder. Example: apply plugin: ‘java’ dependencies { runtime group: ‘com.netflix.exhibitor’, name: ‘exhibitor-standalone’, version: ‘1.5.2’ runtime group: ‘org.apache.zookeeper’, name: ‘zookeeper’, version: ‘3.4.6’ } repositories { mavenCentral() } task getDeps(type: Copy) { from sourceSets.main.runtimeClasspath into ‘runtime/’ } Download the dependencies (and their … Read more

Best way to incorporate Volley (or other library) into Android Studio project

As pointed out by others as well, Volley is officially available on Github: Add this line to your gradle dependencies for volley: compile ‘com.android.volley:volley:1.0.0’ To install volley from source read below: I like to keep the official volley repository in my app. That way I get it from the official source and can get updates … Read more