Skip to content

Unresolved reference. None of the following candidates is applicable because of receiver type mismatch #98

@sergey-morenets

Description

@sergey-morenets

Hi

We tried to add this plugin to our Gradle Kotlin build script but failed to configure its options.

Here is build script:

plugins {
    id("java-library") 
   id("net.ltgt.errorprone") version "4.0.1"  
}

   java { 
       sourceCompatibility = org.gradle.api.JavaVersion.VERSION_22
       targetCompatibility = org.gradle.api.JavaVersion.VERSION_22

       toolchain {
          languageVersion.set(JavaLanguageVersion.of(22))
        }
   }   


dependencies {
    "errorprone"("com.google.errorprone:error_prone_core:2.30.0")
}

    tasks.compileJava {
       options.errorprone.error("EmptyBlockTag")
    }

and error:

options.errorprone.error("EmptyBlockTag")
                          ^ Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
                              public val NamedDomainObjectContain-er<Configuration>.errorprone: NamedDomainObjectProvider<Configuration> defined in org.gradle.kotlin.dsl

Gradle: 8.10
JDK: 22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions