Azur Haljeta
11/18/2020, 3:08 PMpackForXcode
task and instead use cocoapods. And I also want to be able to add iOS-specific libraries directly into build.gradle.kts
, like AFNetworking. I know that this is possible and doable but...
Is there a complete example out there?
I've tried the following but there ae always some issues...iosMain
directory is not treated as a source directory, which makes autocomplete or syntax highlighting impossible and hard to work with
- renaming it to iosX64Main
and tweaking the build.gradle.kts
but this breaks metadata dependency resolving since there is no plain ios
anymoreKamilH
11/18/2020, 3:10 PMkotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
in gradle.properties
Azur Haljeta
11/18/2020, 3:12 PMgradle.propeties
russhwolf
11/18/2020, 3:23 PMiosX64
or iosArm64
targets as needed, rather than using the ios()
builder that uses heirarchical sources. See https://github.com/touchlab/KaMPKit/blob/master/shared/build.gradle.kts#L28-L33
If you are using ios()
, I tend to find it works better in IDEA than Android Studio.Azur Haljeta
11/18/2020, 3:41 PMcommonMain
. I encounter this pretty often in KMM.
in the build.gradle.kts
you've linked earlier, there is this comment:
// Revert to just ios() when gradle plugin can properly resolve it
and the if else
below distinguishes if Xcode wants to build the app on the simulator or on a real device? I'm coming from an Android background so this is somewhat strange to me at firstrusshwolf
11/18/2020, 3:43 PMAzur Haljeta
11/18/2020, 5:17 PM1.4.1
and 1.4.2
mess up the autocomplete feature in all sourcesets
While 1.4.0
works fine