0

I want to build from gradle jar file including sources from several sourceSets. Alongside main I have generated source set with classes from annotation processing.

How can exclude in jar specific package from main sourceSet and include specific package from generated source set?

When try to add it to jar as follows:

jar {
    from sourceSets.main.output.classesDir
    from sourceSets.generated.output.classesDir
}

I get error message: Could not find property 'generated' on SourceSet container.

Then I try to define it in:

sourceSets {
    generated
}

But when execute generatedClasses imports cannot be found in generated classes

L3K0V
  • 1,104
  • 1
  • 9
  • 24

0 Answers0