Do not expose mcdev annotation dependency to downstream consumers
williewillus opened this issue · 4 comments
The mcdev annotations are marked as api
in build.gradle, meaning that any downstream users also get the dependency.
This is causing build warnings in Botania that look like warning: unknown enum constant Env.CLIENT reason: class file for com.demonwav.mcdev.annotations.Env not found
.
Since these annotations are for static analysis, it would be better to let consumers of the library decide whether they want to opt into this system, in which case the consumer would add its own dependency on the annotation library.
I propose changing the dep to be declared with compileOnly
or at least implementation
instead.
(Though I'm not sure if this will fix my issue at hand)
throwing a warning when processing annotation
Is this actually an issue ? If you want the warning to go away, you should be able to add mcdev as dependency
Is this actually an issue ? If you want the warning to go away, you should be able to add mcdev as dependency
Make sense
Facing this issue with IDEA. Project with kotlin that use kapt
as annotation processor for another mod. Throwing a warning when process annotation.
The version of cca is 5.0.2
.
> Task :kaptKotlin
警告: 未知的枚举常量 Env.CLIENT // Unknown enum
原因: 找不到com.demonwav.mcdev.annotations.Env的类文件 // Can't find class
警告: 未知的枚举常量 Env.CLIENT // Unknown enum
原因: 找不到com.demonwav.mcdev.annotations.Env的类文件 // Can't find class