Add sources to main sourceSet

Hi I’m using Gatling through this plugin which creates a gatlingsourceSet but I want to use another plugin for release which has the main sourceSet hardcoded like so:

project.task('sourceJar', type: Jar) {
            it.from project.sourceSets.main.allSource
            it.classifier "sources"

I need to modify the main.allSources to contain what the gatling source set contains.

For reference I currently create an executable of the gatling part like this:

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
task gatlingJar(type: ShadowJar, dependsOn: "gatlingClasses") {
    archiveName = "${}.jar"
    manifest.attributes "Main-Class": "loadtests.Main"
    exclude "META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA"
    from sourceSets.gatling.output
    configurations << project.configurations.gatlingCompile

Thanks in advance.

Hi Marc Guilera. I’m not sure what the question is here. Can you add a little more information about which part you need help with?