Hi! I have an issue using `applyHierarchyTemplate`...
# multiplatform
a
Hi! I have an issue using
applyHierarchyTemplate
(or
applyDefaultHierarchyTemplate
). It raises me a circular dependencies error when I try to configure cinterop. I've investigated a bit, and it seems that just trying to use both
applyHierarchyTemplate
and
mingwX64(native)
in the
kotlin {}
block of
build.gradle.kts
raises the issue:
Copy code
@OptIn(ExperimentalKotlinGradlePluginApi::class)
applyDefaultHierarchyTemplate {}

mingwX64("native")
Does someone has an idea why ?
t
I would guess it’s a bug in the Default template due to being a less used and less tested platform target. I just tried out using
Copy code
applyHierarchyTemplate {
    withMingw()
}
which gives you full control over the hierarchy and template applied. No circular dependency here. Note you preface each target with “with”.
a
ok thanks!