Victor Cardona
06/14/2024, 7:11 PMsample_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
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
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!Vampire
06/14/2024, 8:46 PMoutgoingVariants 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.Victor Cardona
06/16/2024, 12:13 AM