HI,
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:
META-INF/
META-INF/MANIFEST.MF
pmapi.properties
Below is my project structure
-src
-gatling
- resources
-gatling.conf
-scala
- library files
-main
- resources
-test
- resources
i am using gatling Gradle plugin:
plugins {
// The following line allows to load io.gatling.gradle plugin and directly apply it
id ‘io.gatling.gradle’ version ‘3.5.1’
}
Hi Girish,
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:
jar {
from sourceSets.gatling.output
}
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.