is it possible to name the output `.framework` fil...
# kotlin-native
a
is it possible to name the output
.framework
file? I used to do this in the old dsl:
Copy code
sourceSets {
  main {
    component {
      baseName.set("MultiPlatformProject") // Changes the name of the output .framework file
      target 'ios_arm64', 'ios_x64'
      outputKinds = [FRAMEWORK]
    }
  }
}
but unsure if there is an equivalent in the new multiplatform dsl
t
a
starred - thanks
i
@Jonas Bark What do you mean by a dynamic framework? This binaries DSL allows creating a framework with a custom name too: https://github.com/JetBrains/kotlin/blob/1.3.20/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-native-binaries/kotlin-dsl/build.gradle.kts#L69.
custom.framework
is created in this example. The
baseName
property is also provided so you can get the same output by writing something like this:
Copy code
binaries {
    framework {
        baseName = "bar"
    }
}
j
@ilya.matveev when I copy the
Copy code
binaries {
            executable("foo")
            sharedLib()
        }
into my target it will create a .dylib which is what I meant with dynamic library (accidently said framework) Thanks a lot for the framework baseName snippet - that was indeed what I was looking for 🙂
i
I see 🙂 Actually it is possible to create both static and dynamic libraries, executables and frameworks as shown in the example above. I'll add a description for this DSL in the multiplatform documentation.
j
that would be great!