The <Kotlin 1.9.20 Beta blog post> mentions that ...
# gradle
e
The Kotlin 1.9.20 Beta blog post mentions that
If you want to have additional source sets that the default hierarchy template doesn't provide...configuring additional source sets manually as usual with dependsOn()
Does that mean that the API for extending the default hierarchy is being removed, or is it not mentioned because it's still experimental?
j
I'm using the custom hierarchy API in my project, so I hope it's not going anywhere. In 1.9.20 it did change from:
Copy code
targetHierarchy.custom { ... }
to:
Copy code
applyHierarchyTemplate { ... }
The default hierarchy API changed from:
Copy code
targetHierarchy.default()
to:
Copy code
applyDefaultHierarchyTemplate()
which is no longer experimental. There is also still an experimental version of the default hierarchy template where you can extend with additional groups:
Copy code
applyDefaultHierarchyTemplate { ... }
This extension API and
applyHierarchyTemplate
are still marked
ExperimentalKotlinGradlePluginApi
though.
e
Ok phew looks like
applyDefaultHierarchyTemplate { ... }
is what I need, thanks!
👍🏼 1