I want to build only a release XCFramework, but no...
# multiplatform
s
I want to build only a release XCFramework, but not both. Gradle generates me a
assembleXCFramework
task. I see in the docs that there should be also
assembleDebugXCFramework
and
assembleReleaseXCFramework
tasks, but I don't see them... How can I only build the release version? I don't need debug.
1
t
for me this works by using
assemble[Projectname]ReleaseXCFramework
. However, this command is not listed within the available gradle tasks, there i only see
assemble[Projectname]XCFramework
but not the build type specific ones.
s
Yes, it's strange - maybe docs are outdated. I only have
assembleXCFramework - Assemble all types of registered 'shared' XCFramework
But I remember in the past there were tasks that had "shared" in the name. Now I get
Task 'assembleSharedReleaseXCFramework' not found in root project.
Ok, now these are there, but they still build and link debug frameworks. What I needed to do was this:
Copy code
iosArm64 {
    binaries.framework(
        buildTypes = setOf(NativeBuildType.RELEASE)
    ) {
        baseName = "shared"
        embedBitcode("bitcode")
        xcf.add(this)
    }
}
190 Views