-Xjvm-default=all requirement for 1.0.0 causes havoc with KAPT / Room
See original GitHub issueDescribe the bug
I’ve tried to add freeCompilerArgs = listOf("-Xjvm-default=all")
to my kotlinOptions
block, but the code for my Jetpack Room DAO’s do not compile correctly anymore, giving errors about annotations which apparently were dropped. Maybe this is more of a kapt bug, but makes it impossible to use the latest version of Coil.
Expected behavior My project still compiles.
To Reproduce Use a Room DAO with coil 1.0.0 and kapt.
Logs/Screenshots
../build/tmp/kapt3/stubs/appDebug/com/foo/bar/localdb/MyDetailsDao.java:27: error:
An abstract DAO method must be annotated with one and only one of the following annotations: Insert,Delete,Query,Update,RawQuery
public com.foo.bar.MyDetails insertOrUpdate(@org.jetbrains.annotations.NotNull()
^../build/tmp/kapt3/stubs/appDebug/com/foo/bar/localdb/MyDetailsDao.java:15: error:
Abstract method in DAO must be annotated with interface androidx.room.Query AND interface androidx.room.Insert
public abstract interface AugmentedSkuDetailsDao {
Version 1.0.0-rc1
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Room kapt error when upgrading kotlin or gradle
In my case, I have faced the same issue while I have upgraded "kotlin-gradle-plugin: from 1.5.31 to 1.6.10".
Read more >Generate default methods for implementations in interfaces
-Xjvm-default=all generates JVM default methods only, and thus is binary ... This issue causes weird errors with Spring Data repository interfaces.
Read more >What's new in Kotlin 1.6.20
Kotlin 1.6.20 introduces the new annotation @JvmDefaultWithCompatibility : use it along with the -Xjvm-default=all compiler option to create ...
Read more >Support compatibility mode for JVM default in Kotlin for ...
There is simple reproduction scenario with enabled compatibility mode in gradle ``` android { defaultConfig { minSdkVersion 16 //starts work with 21 }...
Read more >-Xjvm-default=all requirement for 2.0.0 alphas causes havoc ...
Describe the bug This library forces us to add -Xjvm-default=all to the compiler properties, which causes issues with Kapt.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Why was this added again in
2.0.0-alpha01
?@colinrtwhite I think this issue might need reopening.
Just replace
interface
with anabstract class
source