Linked Questions

8 votes
1 answer
4k views

I have created a simple Gradle Java project. The build.gradle file looks like this: plugins { id 'java' } repositories { mavenCentral() } dependencies { implementation group: 'org....
Harold L. Brown's user avatar
211 votes
12 answers
377k views

Until now I created runnable JAR files via the Eclipse "Export..." functionallity but now I switched to IntelliJ IDEA and Gradle for build automation. Some articles here suggest the "application" ...
Hannes's user avatar
  • 5,342
125 votes
9 answers
236k views

How do I add config files or any other resources into my jar using gradle? My project structure: src/main/java/com/perseus/.. --- Java packages (source files) src/main/java/config/*.xml --- ...
Pritesh Mhatre's user avatar
96 votes
14 answers
142k views

I'm trying to build a gradle project but, when I try $ gradle build I get the following output: Starting a Gradle Daemon (subsequent builds will be faster) > Task :jar FAILED FAILURE: Build failed ...
136's user avatar
  • 1,237
85 votes
6 answers
51k views

As titled, I'd like to know how to modify the gradle.build.kts in order to have a task to create a unique jar with all the dependencies (kotlin lib included) inside. I found this sample in Groovy: //...
elect's user avatar
  • 7,196
43 votes
5 answers
52k views

I want to build an uberjar (AKA fatjar) that includes all the transitive dependencies of the project. What lines do I need to add to build.gradle? This is what I currently have: task uberjar(type: Jar)...
missingfaktor's user avatar
50 votes
2 answers
36k views

There are two methods of creating, i.e. tasks, in Gradle (5.0+): tasks { val javadocJar by creating(Jar::class) { val javadoc by tasks from(javadoc) classifier = "javadoc"...
madhead's user avatar
  • 33.8k
3 votes
1 answer
10k views

My build.gradle file is as following apply plugin: 'java' sourceCompatibility = 1.8 repositories { mavenCentral() } dependencies { testCompile group: 'junit', name: 'junit', version: '4.12' ...
Marc Zaharescu's user avatar
5 votes
1 answer
6k views

I want to reference a jar file in fixed location for use by multiple executable jars rather than include that jar in each of the executables. I have the following setup which works fine commons-math3-...
stegzzz's user avatar
  • 427
0 votes
1 answer
2k views

I am working in an old project which was using Gradle Wrapper v3.2.1, but I want to update it to the latest version (currently v5.4.1). I have tried updating it to v4.10.2 first but it fails too, so ...
froblesmartin's user avatar
0 votes
0 answers
549 views

I'm working on upgrading a Gradle build script from Gradle 6.9.4 to 7.x (or newer), for a SpringBoot based Java 11 web application. The original script is included below and it works correctly. The ...
Mike Dinescu's user avatar
2 votes
0 answers
296 views

After countless days of trying to find an answer to my question, I've decided to post it here. I've been developping a monitoring application for my company, and as I'm about to distribute it, the jar ...
Nephty's user avatar
  • 150
0 votes
1 answer
313 views

I am having problem with creating an executable JAR file where i can double click an icon and make my program start. I've made a fun little app for my friend for him to try this Xmas, but i've spent ...
Brage Rochman Fridriksson's user avatar
-1 votes
1 answer
134 views

I'm making Minecraft Forge MOD. It uses JACo MP3 Player, but I got runtime error when I install it to its client. It causes an error when triggering the library event in-game: [Client thread/INFO]: [...
Sool Sim's user avatar
0 votes
0 answers
59 views

I used gradle to try to create a fat jar from this answer How do I create an executable fat JAR with Gradle with implementation dependencies? tasks.jar { manifest.attributes["Main-Class"] = &...
echo's user avatar
  • 823