Hi there! We are having a strange issue today wher...
# ksp
g
Hi there! We are having a strange issue today where a generated
META-INF/services/xxx
(through
ServiceLoader
) with a KSP processor is not present on the final APK. I noted latest version has added this change: https://github.com/google/ksp/blob/1.5.21-1.0.0-beta06/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/AndroidPluginIntegration.kt#L93 And seems to work on the test, but for some reason, it isn’t for us. It started working after I add this workaound:
Copy code
android.applicationVariant.all {
            processJavaResourcesProvider.configure {
                from("$buildDir/generated/ksp/${this@all.name}/resources")
            }
        }
Any idea why
registerPostJavacGeneratedBytecode
may not be enough? I did played a bit with the
ksp
’s
AndroidIT
and it seems to work in there
@Zac Sweers maybe? I’ll try to provide a sample project. We are basically running a KSP processor that generates a provider class on each Android module. Then we collect all of them through
ServiceLoader
. With KAPT this seems to work fine, but now with KSP it’s not finding any of them, but the
META-INF/services/xxx
files are getting generted on each project 🤔
z
File a bug
👍 1