I'm trying to use an internal declaration declared...
# gradle
r
I'm trying to use an internal declaration declared in one gradle subproject (
:shared
) in another subproject (
:orchestrator
). I've tried
KotlinCompilation#associateWith
but that errors because the target instances are not the same (Both are JVM though). So now I'm trying this to circumvent that check:
Copy code
val orchestratorMain = kotlin.target.compilations["main"]

project(":shared").afterEvaluate {
  val associatedCompilations = (orchestratorMain.allAssociatedCompilations as MutableObservableSet<KotlinCompilation<*>>)
  val sharedMain = kotlin.target.compilations["main"]

  sharedMain.allAssociatedCompilations.forAll { compilation -> associatedCompilations.add(compilation) }
}
But this is still throwing compilation errors about the declaration being private
v
@tapchicoma you said something about friend-path changes recently, didn't you?
t
yeah, we are working on redesigning friends feature. So far it looks like we could drop
-Xfriend-path
argument and introduce some public DSL for it. Timeline wise I am not sure in which Kotlin release it will happen
@rad it is a little hard to help without a repro project