Hi everyone, I am using `podPublishReleaseXCFrame...
# multiplatform
m
Hi everyone, I am using
podPublishReleaseXCFramework
to build our library for iOS. I only want to build the framework for
arm64
, which is why I have declared only the
iosArm64
target in
build.gradle.kts
. My issue is that Gradle still runs
compileKotlinIosSimulatorArm64
. Is there any way to turn that off?
a
Hi Marc, can you share your
build.gradle.kts
file?
m
Hi Artem, It’s not that easy since we have also moved some of our configuration into a custom plugin. But I have looked into the plugin, and it it turns out it was our fault: the plugin added
iosX64
and
iosSimulatorArm64
due to a bug on our end… However, after I fixed that, another issue came up. When I only specify iosArm64, I get the following error: “Could not determine the dependencies of task ‘:$PROJECT:linkPodReleaseFrameworkIosArm64’”
Copy code
Could not resolve all dependencies for configuration ':$PROJECT:iosArm64CompileKlibraries'.
Consumable configurations with identical capabilities within a project (other than the default configuration) must have unique attributes, but configuration ':hero-core:main:podDebugFrameworkIosFat' and [configuration ':$PROJECT:podDebugFrameworkIosArm64'] contain identical attribute sets. Consider adding an additional attribute to one of the configurations to disambiguate them. Run the 'outgoingVariants' task for more details. See <https://docs.gradle.org/8.1.1/userguide/upgrading_version_7.html#unique_attribute_sets> for more details."
When I add
iosX64
, the error is gone, and the framework is created. Leaving out
iosSimulatorArm64
works, by the way. It seems that I have to add
iosX64
for
podPublishReleaseXCFramework
to succeed. I have set
kotlin.mpp.enableCInteropCommonization=true
in
gradle.properties
btw
a
m
Adding a custom attribute did the trick. I just find it weird that this is only necessary when I do not specify the
iosX64
target 🤷 Thanks a lot @a-dd 👍
a
hi @Marc Dietrichstein, just wondering why only
iosArm64
? are newer devices only uses
iosArm64
and no need to support rest , i was trying to speed up framework packaging, ended up using this
Copy code
./gradlew podPublishReleaseXCFramework -x iosX64Test -x linkPodReleaseFrameworkIosX64 -x linkPodReleaseFrameworkIosSimulatorArm64