gradle
Daemon is stopping immediately JVM garbage collector thrashing and after running out of JVM memory
I add gradle.properties file in my root project dir,and add this config: org.gradle.jvmargs=-Xmx4096M works. From the error message we can know the Daemon JVM spcace exhausted. This is the Gradle official docuemnt about this config: Specifies the JVM arguments used for the Gradle Daemon. The setting is particularly useful for configuring JVM memory settings for … Read more
How can I get the current git branch in gradle?
You also are able to get git branch name without the plug-in. def gitBranch() { def branch = “” def proc = “git rev-parse –abbrev-ref HEAD”.execute() proc.in.eachLine { line -> branch = line } proc.err.eachLine { line -> println line } proc.waitFor() branch } Refer to: Gradle & GIT : How to map your branch … Read more
Gradle error with lack of mainClassName property in gradle build
The application plugin needs to know the main class for when it bundles the application. In your case, you apply the application plugin for each subproject without specifying the main class for each of those subprojects. I had the same problem and fixed it by specifying “mainClassName” at the same level as apply plugin: ‘application’ … Read more
How to add external library’s sources and javadoc to gradle with IntelliJ?
I’m not sure if your library is stored in a maven repository or not. I assume it is. I know of two ways of importing a gradle project into IntelliJ. The first being the “Import Project…” wizard from IntelliJ which works nicely. But it does not import the javadoc jars if they exist. At least … Read more