Niklas
04/26/2023, 6:32 AMjush
04/26/2023, 7:42 AMNiklas
04/26/2023, 7:53 AMjush
04/26/2023, 7:56 AMNiklas
04/26/2023, 8:05 AMjush
04/26/2023, 8:14 AM// First disable all dokka source sets except the `variantName` one that will be used later
dokkaSourceSets.configureEach {
suppress.set(name != variantName)
}
then manually add the source sets to the dokka source set:
// To avoid undocumented inherited methods/classes we need to join all the source roots
// related to the flavor release variant into one source set (`variantName`).
dokkaSourceSets.named(variantName) {
sourceSets.forEach {
it.javaDirectories.forEach { javaDirectory ->
sourceRoots.from(javaDirectory)
}
}
}
sourceSets
can be acquired from the android plugin:
libraryVariants.all {
// here you can access sourceSets
}
Unfortunately, I can’t share my solution since it’s quite tight to our project. Hopefully this points you towards the right directionNiklas
04/26/2023, 8:16 AMIgnat Beresnev
04/26/2023, 1:28 PM