JuulLabs / exercise

Annotation processor for Android activity intent extras.
https://juullabs.github.io/exercise/
Apache License 2.0
8 stars 2 forks source link

Build failure with Native targets while using hierarchical project structure #182

Closed twyatt closed 1 year ago

twyatt commented 1 year ago

Attempted to add macosArm64 target to SensorTag example but am now getting the following build time failure:

* What went wrong:
Could not determine the dependencies of task ':app:compileNativeDarwinMainKotlinMetadata'.
> Could not create task ':app:kspNativeDarwinMainKotlinMetadata'.
   > class org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile_Decorated cannot be cast to class org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon (org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile_Decorated and org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @6db3646e)

Commenting out ksp(libs.exercise.compile) in app/build.gradle.kts allows the Native targets to build, but obviously breaks the Android target (because it relies on Exercise).

twyatt commented 1 year ago

Fixed by using platform specific KSP configuration.