google / google/ksp

2.1.20-2.0.0 A problem was found with the configuration of task ':composeApp:kspKotlinIosArm64' (type 'KspAATask')

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

Description

> Task :composeApp:kspCommonMainKotlinMetadata
error: A problem was found with the configuration of task ':composeApp:kspKotlinIosArm64' (type 'KspAATask').

FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':composeApp:kspKotlinIosArm64' (type 'KspAATask').
- Gradle detected a problem with the following location: '/Volumes/data/kmp_code/kmp_base/composeApp/build/generated/ksp/metadata/commonMain/kotlin'.

Reason: Task ':composeApp:kspKotlinIosArm64' uses this output of task ':composeApp:kspCommonMainKotlinMetadata' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

Possible solutions:
1. Declare task ':composeApp:kspCommonMainKotlinMetadata' as an input of ':composeApp:kspKotlinIosArm64'.
2. Declare an explicit dependency on ':composeApp:kspCommonMainKotlinMetadata' from ':composeApp:kspKotlinIosArm64' using Task#dependsOn.
3. Declare an explicit dependency on ':composeApp:kspCommonMainKotlinMetadata' from ':composeApp:kspKotlinIosArm64' using Task#mustRunAfter.

For more information, please refer to https://docs.gradle.org/8.9/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure involving :composeApp:kspCommonMainKotlinMetadata and :composeApp:kspKotlinIosArm64 under Gradle 8.9. Trace how KspAATask wires the generated ksp/metadata/commonMain/kotlin output between these tasks. Done means the build no longer reports an undeclared task dependency and the relevant Kotlin/Native task completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.