Skip to content

Tag: gradle

Adding log4j to build.gradle

Trying to create simple Gradle Java project in my Eclipse. I’m using LOG4J library, so my build.gradle looks: I added two lines in this file that I expect will allow to download log4j library: But looks this not help, because in case I build project with gradle I have compile errors. I suppose I declare…

Zip directory to multiple destinations using Gradle

Is it possible with Gradle’s Zip task to copy the resulting zip into multiple destinations? AFAIK you can only zip multiple input directories with only one output destination. Is there a way to zip a directory and copy the archive to multiple destinations (in one single task)? Since I’m bound to u…

Generate and consume gradle dependency without POM

I am trying to generate the .jar of my Gradle project but when it is generated using Maven publishing it is also generating a .pom file. The problem is that I have another project that when it implements this dependency before it only looked for .jar and now it looks for .pom in all the others, what I want to

gradle build broken after dependency update

I use gradle to build a java project (ASCIIGenome). One of the dependencies of ASCIIGenome is a repository on github (htsjdk, as you can see is a fork with some changes of mine). The ASCIIGenome project builds fine if I use this commit of htsjdk in build.gradle: I made edits to htsjdk so now the dependency is…

how do I import java class in build.gradle file

I want to import static data in build.gradle file from below class: I saw a project where they used, something like: but I couldn’t figure out what configurations are to be provided in order to have the visibility of java class from build.gradle. Any help would be highly appreciated. Answer You’ll…

How is Kotlin able to call Java 11 code using JDK 1.8?

I was playing around with a Kotlin project which has some Java 11 calls and noticed that it seems to build and run fine using Java 8. The call in particular is to java.lang.String#isBlank(), which was introduced in Java 11. I’m using Gradle to build and run tests. Build JDK is set to JDK 1.8 and Kotlin …