google / ksp

Kotlin Symbol Processing API
https://github.com/google/ksp
Apache License 2.0
2.84k stars 266 forks source link

Issue when Compiling for iOS Kotlin Multiplatform for Latest Mvn Version 2.0.0-Beta2-1.0.16 #1673

Closed TheArchitect123 closed 9 months ago

TheArchitect123 commented 9 months ago

Currently getting an issue when deploying a Kotlin iOS Multiplatform Project.

I have recently upgraded to the latest version from MvnCentral (https://mvnrepository.com/artifact/com.google.devtools.ksp/symbol-processing-api/2.0.0-Beta2-1.0.16)

, as per the below issue's suggestions. https://github.com/google/ksp/issues/1666

Below are the logs I'm getting from Gradle.

> Task :xcodeVersion
> Task :shared:checkKotlinGradlePluginConfigurationErrors
> Task :shared:generateMRcommonMain UP-TO-DATE
> Task :shared:generateMRiosSimulatorArm64Main
> Task :shared:kspKotlinIosSimulatorArm64 FAILED
error: Some problems were found with the configuration of task ':shared:kspKotlinIosSimulatorArm64' (type 'KspTaskNative').

FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the configuration of task ':shared:kspKotlinIosSimulatorArm64' (type 'KspTaskNative').
  - In plugin 'com.google.devtools.ksp' type 'com.google.devtools.ksp.gradle.KspTaskNative' property 'produceUnpackedKlib$kotlin_gradle_plugin_common' doesn't have a configured value.

    Reason: This property isn't marked as optional and no value has been configured.

    Possible solutions:
      1. Assign a value to 'produceUnpackedKlib$kotlin_gradle_plugin_common'.
      2. Mark property 'produceUnpackedKlib$kotlin_gradle_plugin_common' as optional.

    Reason: Task ':shared:kspKotlinIosSimulatorArm64' uses this output of task ':shared:generateMRiosSimulatorArm64Main' 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 ':shared:generateMRiosSimulatorArm64Main' as an input of ':shared:kspKotlinIosSimulatorArm64'.
      2. Declare an explicit dependency on ':shared:generateMRiosSimulatorArm64Main' from ':shared:kspKotlinIosSimulatorArm64' using Task#dependsOn.
      3. Declare an explicit dependency on ':shared:generateMRiosSimulatorArm64Main' from ':shared:kspKotlinIosSimulatorArm64' using Task#mustRunAfter.

    Reason: Task ':shared:kspKotlinIosSimulatorArm64' uses this output of task ':shared:generateMRcommonMain' 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 ':shared:generateMRcommonMain' as an input of ':shared:kspKotlinIosSimulatorArm64'.
      2. Declare an explicit dependency on ':shared:generateMRcommonMain' from ':shared:kspKotlinIosSimulatorArm64' using Task#dependsOn.
      3. Declare an explicit dependency on ':shared:generateMRcommonMain' from ':shared:kspKotlinIosSimulatorArm64' using Task#mustRunAfter.

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

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

@neetopia

TheArchitect123 commented 9 months ago

I found the issue. Thanks