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 declared log4j in deprecated way (I
Tag: gradle
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 using Gradle v5.0, a solution for that version of
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
unable to write the logs to log file using log4j through Gradle
I am working on Cucumber TestNg Gradle automation project. As I am new to Gradle and not able to figure the issue though I have put in appropriate log4j dependencies in build.gradle file. Can somebody look into this issue and provide the solutions or advise me on what went wrong due to which logs are not written to log file
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 and now the
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 want to use buildSrc: https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#sec:build_sources So for your example,
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 compile target is
Gradle Compile & Execute the Single Java Class with third-party jar dependencies using Gradle `buildscript`
I followed this answer https://stackoverflow.com/a/19418847/1665592 but it doesn’t help me to compile single java files using Gradle. It says Task :compileMessageKeys NO-SOURCE Why? I just have only one Java File CreateMessageKeysTask.java which is dependent on “apache-ant-1.7.0/ant.jar” jar My ant script is as below Below are the class import statements used in my Java File. EDIT I tried something below as
gradle javaexec error “‘apiElements’ directly is not allowed”- Gradle 5.4.1
I am new to Gradle and trying to migrate an existing system build from ant to Gradle. As part of this I need to run a java program on every file in a directory. Directory contains xml files and the java code will parse and convert .xml to .java files (and these Java files would be build to generate class
gradle Jigsaw module not found
I try to run a very simple gradle project which uses java 9 modules, but i receive the following error. Here is it https://github.com/vad0/test_modules. The main class does basically nothing. It uses only one dependency: HdrHistogram. I included this magic command in build.gradle according to official gradle tutorial https://docs.gradle.org/current/samples/sample_java_modules_multi_project.html. The whole build.gradle looks like this. module.info looks like this I