google / google/ksp

How to generate code for common Ios target instead of individual (X64, Arm64) source sets

Open
#929 9 comments 30 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
3.5k
Forks
415
Avg merge
1d 2h
Merged PRs (30d)
53

Description

We use the shorthand `ios()` function to configure common ios source sets and we only have code in the `iosMain` source set. However ksp generates code into the IosX64 and IosArm64 source sets. For both source sets, identical code is generated, but we cannot access the definitions from the `iosMain` source set.

```
dependencies {
add("kspAndroid", project(":processor"))
add("kspIosX64", project(":processor"))
add("kspIosArm64", project(":processor"))
}
```

If we try to configure ` add("kspIos", project(":processor"))` we get the following error: `Configuration with name 'kspIos' not found.`

Either the commonization task should run on the generated sources and generate the common definitions or ksp should generate code for the `iosMain` source set.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.