Open Sanlorng opened 3 months ago
Hi, do you know if there is any documentation about the android multiplatform library plugin ?
Hi, do you know if there is any documentation about the android multiplatform library plugin ?
According to the official documentation of KSP, we should declare symbol processors based on the compilation target or source code directory. In Android Multiplatform Library plugin, the androidTest
source code directory no longer exists. Instead, there are two configurable test source code directories: one for androidTestWithJvm
(default name: AndroidTestWithJvm) and another for androidTestWithDevice
(default name: AndroidTestWithDevice). These two types of directories are only created in the KotlinExtension.sourceSets
when explicitly declared by the user, and their names can be modified. You can find more details in the official Android Multiplatform Library plugin documentation. In the Ktorfit Gradle Plugin, it seems that symbol processors are declared based on the compilation target, and for the test part, you may need to handle it separately by iterating through the SourceSets
or allowing users to declare it themselves. This flexibility could enhance the applicability of the Ktorfit Gradle Plugin.
Thank you very much for the informations! I think i will add a check if a sourceset with "Test" exist and only then apply KSP
Hi with version 2.1.0 i added the check for "test". It should not lead to compilation error anymore, but you would have to add ksp manually for e.g. the androidTestWithDevice task
Ktorfit version
2.0.1
What happened and how can we reproduce this issue?
the ktorfit gradle plugin will add ksp depedency named 'kspAndroidTest' automatically, but it seems not exist when android multiplatform library plugin(com.android.kotlin.multiplatform.library) applied, when i change android multiplatform library to android library plugin(com.android.library), the ktorfit gradle plugin works normally.
What did you expect to happen?
work with android mutiplatform library plugin
Is there anything else we need to know about?
No response