I need to build a jar using gradle so that i can include this jar as dependency on another project. I have few classes written using gatling, when i try to build jar using gradle.
Generated Jar has only following files:
Below is my project structure
- library files
i am using gatling Gradle plugin:
// The following line allows to load io.gatling.gradle plugin and directly apply it
id ‘io.gatling.gradle’ version ‘3.5.1’
I believe this is because the gradle gatling plugin uses a different source set. If I’m not mistaken by default the “main” sourceSet is included into the JAR.
You should be able to include the output from the gatling sourceSet into your JAR by adding something like the following code snippet into your build.gradle:
However if the “library files” you are referring to are external dependencies like jars, you probabaly rather want to have a “FatJar” that contains all required dependencies.
Hope this helps
Julius that worked, Thanks a lot.