I get into trouble while I try to run my JUnit test through Gradle test task. While I run the test in eclipse directly with Run As -> JUnit test, everything is ok, the test succeeds. But through test task, test always fails. Probably some trouble with the encoding of my resource txt file. So I would like to enable
Tag: gradle
How do I set JVM options for GradleWorkerMain?
When I set GRADLE_OPTS or JAVA_OPTS, these are set for GradleWrapperMain when I run ./gradlew build for my project. But I need them to be set for GradleWorkerMain as well. How do I do that? Here’s the ps listing when that Gradle job is running in Bamboo. My JAVA_OPTS (such as -Dcool.opt=1) is missing from GradleWorkerMain. Answer There is no
How to add local .jar file dependency to build.gradle file?
I have tried to add my local .jar file dependency to my build.gradle file: And you can see that I added the .jar files into the referencedLibraries folder here: https://github.com/WalnutiQ/wAlnut/tree/version-2.3.1/referencedLibraries But the problem is that when I run the command: gradle build on the command line I get the following error: Here is my entire repo: https://github.com/WalnutiQ/wAlnut/tree/version-2.3.1 Answer If you
Running jacocoReport
I’m using Gradle 1.7 and Jacoco plugin. My project uses Java and Scala plugins. When I run gradlew -i clean jacocoTestReport Report is not created and I see in the log What does it mean? Why report is not created? Answer The task will only run if coverage data is available. You can make sure of that by also running
How can I add a linked source folder in Android Studio?
In Eclipse I can add a source folder to my Android project as a “linked source folder”. How do I achieve the same thing in Android Studio? Or is it possible to add an external folder to build in Gradle? Answer In your build.gradle file, add the following to the end of the Android node:
Is it possible to declare a variable in Gradle usable in Java?
Is it possible to declare a variable in Gradle usable in Java ? Basically I would like to declare some vars in the build.gradle and then getting it (obviously) at build time. Just like a pre-processor macros in C/C++… An example of declaration would be something like that … : Is there a way to do something like that ?
How to create Java gradle project
How to create Java Gradle project from command line? It should create standard maven folder layout like on the picture below. UPDATE: .1. From http://www.gradle.org/docs/current/userguide/tutorial_java_projects.html I need to create file build.gradle with 2 lines .2. Add to build.gradle task below, than execute gradle create-dirs .3. Then run gradle eclipse (or corresponding string to other IDE plugin configured) So is there
Liquibase plugin for gradle
I’ve been looking for a liquibase gradle plugin and found gradle-liquibase-plugin from tlberglund. Gradle version 1.2 build file: Runnin gradle build fails with the following error: Does anyone have experience with this plugin, I would really appreciate a working example. Answer The problem isn’t related to the Liquibase plugin. You just need to declare a repository in the buildscript {}
Specify the GRADLE_USER_HOME in Windows 7
How do I configure the GRADLE_USER_HOME option? My Windows username contains a space(C:UsersBaz Foo) and I think that the build fails because of this. I have added an environment variable GRADLE_USER_HOME and set it to C:UsersBaz Foo.gradle and tried also with –gradle-user-home=”C:UsersBaz Foo.gradle” but none of them work. Answer I have explicitly defined GRADLE_USER_HOME to point to a path without
Gradle does not find tools.jar
I am using javadoc doclets with gradle, so I need to use the package tools.jar, which is in the lib folder from the jdk (1.6.0_26 in my case). The point is that gradle does not take it automatically, so I was adding that tools package to my libs folder, and then adding it to dependencies.gradle . Now I want to