Closed rschattauer closed 1 year ago
Thanks for flagging. I'll have to investigate what the recommended API is going forward. Should be straightforward to fix it if it only requires using a different API (haven't investigated yet)
If anyone is interested, here's the work around in groovy:
tasks.withType(KspTask).configureEach {
doLast {
def tree = fileTree(buildDir)
tree.include("**/*ShowkaseExtension*.kt")
tree.files.forEach { file ->
def rep = new ReplaceRegExp()
rep.setMatch("public fun Showkase.getMetadata")
rep.setReplace("@Suppress(\"DEPRECATION\") public fun Showkase.getMetadata")
rep.setFlags("g")
rep.setByLine(true)
rep.setFile(file)
rep.execute()
}
}
}
Hello.
Please bump compileSdk to 34 for your lib and sample.
In my project I have
allWarningsAsErrors = true
withinkotlinOptions { .. }
. The issue is that ksp generates the followingClass.forName("de.hochbahn.hvvswitch.ui.RootModuleCodegen").newInstance()
wherenewInstance()
is deprecated with compileSdk 34 and this fires due toallWarningsAsErrors = true
.As workaround I currently run a script after the gradle ksp task that adds
@Suppress("DEPRECATION")
to that function: