Marc Dietrichstein
06/01/2023, 8:38 AMpodPublishReleaseXCFramework
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-dd
06/01/2023, 11:00 AMbuild.gradle.kts
file?Marc Dietrichstein
06/01/2023, 11:36 AMiosX64
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’”
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
btwa-dd
06/01/2023, 12:06 PMMarc Dietrichstein
06/02/2023, 4:57 AMiosX64
target 🤷
Thanks a lot @a-dd 👍Ahmed na
06/04/2023, 12:57 AMiosArm64
? are newer devices only uses iosArm64
and no need to support rest ,
i was trying to speed up framework packaging,
ended up using this
./gradlew podPublishReleaseXCFramework -x iosX64Test -x linkPodReleaseFrameworkIosX64 -x linkPodReleaseFrameworkIosSimulatorArm64