Skip to content

Gradle build finishes -- No warning found in compiler output #17

@aplatypus

Description

@aplatypus

I've added the following javac-warning-annotation coordinated into my build.gradle file.

// https://mvnrepository.com/artifact/com.pushtorefresh/javac-warning-annotation
compile group: 'com.pushtorefresh', name: 'javac-warning-annotation', version: '1.0.0'

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 ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions