I am trying to run the gradle command. This has worked initially. However it has started failing after some time, as it is not able to start daemon. I am using Gradle 2.5 with IBM jdk 1.6 on Windows 7 Enterprise. I have cleaned up the .gradle directory in my user home directory and restarted my system. This i…
Tag: gradle
Installing and using Gradle in a docker image/container
I am getting this strange error at the end of the process of creating a docker image from a Dockerfile: The relevant part of the Dockerfile: The command I am using is: docker build -t java_i . The strange thing is that if: I run a container from the previous image commenting out RUN gradle test jar (command: …
How to specify the JDK version in Android Studio?
Android Studio is giving me a Gradle build error that looks like this: Now it gives me these clickable prompts: And I have already downloaded and installed JDK 7. The problem is when I go to select it in the “File System” i can only find a directory named 1.6.0 JDK. Furthermore, the installation o…
How can I set the compileOptions for my Gradle Java plugin?
I want to set the -parameters command on my gradle build so that I can use reflection to access the name of the parameters. It seems like I should be doing this with the following closure. But compileOptions is listed as read-only, and when I look at the source code there’s no setter. https://gradle.org…
Gradle build failing after updating to Gradle 1.2.2
I have a java project that utilizes Gradle for testing and building. I recently had to update my JVM to 1.7.0_75 to use Maven for another project for work. Now I have gone back to my Gradle project, I found that gradle -v was returning command not found, and after I used brew install Gradle, my build script r…
Add provided dependency to test classpath using Gradle
I’ve provided dependency scope configured like below. My problem is, the provided dependencies are not visible during runtime in tests. How can I configure this to keep the dependencies provided but available on the test classpath? One solution is to add the dependency like the joda-time library with te…
How to pass JVM options from bootRun
I’m developing simple Spring web application that communicates with remote host and I would like to test it locally behind corporate proxy. I use “Spring Boot” gradle plugin and the question is how can I specify proxy settings for JVM? I have try several ways to do it: gradle -Dhttp.proxyHos…
Java project with Gradle in IntelliJ IDEA: cannot resolve symbol ‘google’ but project compiles
I have a toy Java project set up with Gradle in IntelliJ IDEA 13.1.2. It compiles and runs fine, but the IDE highlights ‘google’ in as red and warns “Cannot resolve symbol ‘google’”. Any idea how to fix it? I have tried 1) deleting .idea/ and re-creating the project in IntelliJ I…
“Cannot start compilation: the output path is not specified for module…”
I have a very simple Java + Gradle project. It builds fine. It runs fine from the shell with “gradle run”. However, if I try to run inside of IntelliJ, I get: My “Compiler output” is set to “Inherit project compile output path”. I don’t want a custom output path, what…
Transitive dependencies not resolved for aar library using gradle
I have investigated a while and probably saw most popular answers here related to aar and transitive dependencies but somehow it is still not clear for me how to make this working. So: I have android library with given gradle config: Then I am deploying it to local maven repo with gradle install. POM file of …