uber/NullAway

Build failure : 'options.compilerArgumentProviders.errorprone$0.name' is missing an input or output annotation.

TeenaJoseph opened this issue · 1 comments

A problem was found with the configuration of task ':app:compileEmuDebugJavaWithJavac' (type 'JavaCompile').
  - Type 'org.gradle.api.tasks.compile.JavaCompile' property 'options.compilerArgumentProviders.errorprone$0.name' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.

    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.

Environment:
Gradle version 7.5
Android Java Project

build.gradle Code snippet:

plugins {
    // ... other plugins
    id "net.ltgt.errorprone" version "3.1.0" // Optional
}

dependencies {
    //nullaway
    errorprone "com.uber.nullaway:nullaway:0.10.24"
    compileOnly "com.google.code.findbugs:jsr305:3.0.2"
    errorprone "com.google.errorprone:error_prone_core:2.25.0"
import net.ltgt.gradle.errorprone.CheckSeverity

tasks.withType(JavaCompile) {
    options.incremental = false//set to true for incremental build
    // remove the if condition if you want to run NullAway on test code
    if (!name.toLowerCase().contains("test")) {
        options.errorprone {
            check("NullAway", CheckSeverity.ERROR)
            option("NullAway:AnnotatedPackages", "com.example")
        }
    }
}

Sorry, I don't have enough context to understand what's happening here, but note that net.ltgt.errorprone no longer supports Android; see here for details.

I don't think this is a NullAway issue, so I'm going to go ahead and close. But please comment if you have more evidence this is related to NullAway.