Gradle build null console object
For some reason, running gradle in daemon mode causes a null console object. If you specify the appropriate command line flag, ./gradlew assembleRelease –no-daemon it’ll work.
For some reason, running gradle in daemon mode causes a null console object. If you specify the appropriate command line flag, ./gradlew assembleRelease –no-daemon it’ll work.
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)
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
Gradle 0.9 allows you to import a build script from another build script. Have a look at: Configuring the project using an external build script. Basically it’s apply from: ‘other.gradle’. One thing the user guide doesn’t mention is that the ‘from’ parameter can be a URL, so you can make your shared scripts available via … Read more
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
you can call ./gradlew –stop in a Terminal and it will kill all gradle processes
I agree with Maravilho Singa’s answer. It appears to be a bug in gradle. I found another solution here: removing the .gradle directory in the root project directory will fix the problem.
To execute a task of a specific subproject, specify its task path. For example: gradle :ABC:build The leading : stands for the root project. ABC is the subproject, and build a task in that project.
While I have no problem with the use gradle makes of Ant, I agree with the original poster that it is undesirable in this case. I found a github project by Tom Anderson here that describes what I believe is a better approach. I modified it a small amount to fit my needs (output to … Read more
I’m not quite sure why Android Studio is slower than the command line, but you can speed up your builds by turning on incremental dexing. In your module’s build file, add this option to your android block: dexOptions { incremental true } In that dexOptions block you can also specify the heap size for the … Read more