You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was getting compiler errors for the @Warning(...) annotation with the provided scope. Errors went away when I put the dependency into compileOnly.
When I build, I am not seeing a warning on the class I used it on. Is the "provided" scope the only way the annotation will work? I didn't tink that would make much difference one way or the other.
I noticed that you had some to-do with annotations. This is how I set-up the configurations following below. The two things to ask about are the:
annotationProcessor and
lombok
I wondered if either of these are going to mess-up the @Warning?
dep_javacWarning = "com.pushtorefresh:javac-warning-annotation:1.0.0"
:
configurations {
annotationProcessor
provided
}
dependencies
{
provided (
dep_javacWarning // <-- Compile errors on @Warning
)
compileOnly (
dep_lombok, // Must come first
dep_javacWarning // <-- Compiles clean with the entry here.
)
:
}
Many thanks ....
The text was updated successfully, but these errors were encountered:
You should be able to make it work by declaring it as both compileOnly and annotationProcessor
Reason being that I ship both the annotation and the annotation processor in same dependency.
If you declare it only as compileOnly then annotation processor won't run, if you declare it only as annotationProcessor then the annotation won't be available, thus you need to declare as both:
I've added the following
javac-warning-annotation
coordinated into mybuild.gradle
file.I was getting compiler errors for the
@Warning(...)
annotation with theprovided
scope. Errors went away when I put the dependency intocompileOnly
.When I build, I am not seeing a warning on the class I used it on. Is the "
provided
" scope the only way the annotation will work? I didn't tink that would make much difference one way or the other.I noticed that you had some to-do with annotations. This is how I set-up the
configurations
following below. The two things to ask about are the:annotationProcessor
andlombok
I wondered if either of these are going to mess-up the
@Warning
?Many thanks ....
The text was updated successfully, but these errors were encountered: