Hi! I'm trying to integrate Sonarqube into a comp...
# community-support
v
Hi! I'm trying to integrate Sonarqube into a composite build. Following the
sample_structuring_software_projects_kotlin-dsl
example I have created an aggregation build that consolidates all Jacoco reports. In that example this configuration gathers all main classes
Copy code
val classesPath by configurations.creating {
    isVisible = false
    isCanBeConsumed = false
    extendsFrom(aggregate)
    attributes {
        attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME))
        attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.LIBRARY))
        attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.CLASSES))
    }
}
and this configuration gathers all main sources
Copy code
val sourcesPath by configurations.creating {
    isVisible = false
    isCanBeConsumed = false
    extendsFrom(aggregate)
    attributes {
        attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.VERIFICATION))
        attribute(VerificationType.VERIFICATION_TYPE_ATTRIBUTE, objects.named(VerificationType.MAIN_SOURCES))
    }
}
I was wondering if there was a way to do the same for test classes and sources. Thanks!
v
If you use
outgoingVariants
task on the producer, you see which variants are present for consumption. If what you are after is not present, you can of course add it.
v
Thank you I will look into that!
👌 1