Looks like enums from depending modules are not ex...
# multiplatform
x
Looks like enums from depending modules are not exported by default (even when the dependency is exported). Not sure why? 🤔
Copy code
dependencies {
  api(project(":module-where-my-enum-lives"))
}
e
I think this is behind a flag to avoid unexpected side effects, like massive binaries, etc...
x
yeah, looks like its not just enums - any classes that are not directly referenced in the original module is not exported by default
g
It's exported on my project 🤔 I use binaries.executable() and
api(project(":..."))
in commonMain dependencies if this can help. (EDIT: I thought about JS but looks like you're working with iOS, my bad)
x
I have this setup
Copy code
// :app
kotlin {
  ..
  listOf(
    iosX64(),
    ..
  ).forEach { target ->
    with(target) {
      binaries {
        framework {
          baseName = "App"
          ..
          export(project(":search"))
        }
      }
    }
  }
  ..
  sourceSets {
    val iosX64Main by getting
    ..
    val iosMain by creating {
      dependsOn(commonMain)
      iosX64Main.dependsOn(this)
      ..

      dependencies {
        ..
        api(project(":search"))
      }
    }
  }
}
i noticed that once i reference this model anywhere from
:app
module, it is immediately exported. If there is not reference to it, it is not exported