I'm trying to create a custom compilation for the ...
# multiplatform
e
I'm trying to create a custom compilation for the metadata target, but I'm getting an error that says
Can't create custom metadata compilations by name
. I'm doing:
Copy code
kotlin {
  targets {
    getByName("metadata") {
      compilations.create("testUtils")
    }
  }
}
I'm trying to do this because I have a
commonTest
sourceSet that has a mix of tests and utils in it. I also have a custom jvm compliation for benchmarks that relies on the utils in
commonTest
. I can't add
commonTest
output classfiles as a dependency because then it brings in the common tests, which I do not want. Any ideas other than creating separate modules for all of these things?
Current plan is to use a base source set. We'll see how this goes 👀